Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title is not shown #6

Open
wiemann opened this issue Sep 20, 2012 · 8 comments
Open

title is not shown #6

wiemann opened this issue Sep 20, 2012 · 8 comments

Comments

@wiemann
Copy link

wiemann commented Sep 20, 2012

Even though the title-tag for the link is used, the plugin doesn't show the title when displaying the image. It should make use of the title tag. In the examples the title tag is also filled, but unfortunately it doesn't trigger any action in the display.

@leecody
Copy link

leecody commented Oct 15, 2012

I modified the plugin to add this for my own implementation, it's not too difficult.

You'd need to add in the container to hold the title when you add in all the other elements:

        imageTitle = $('<div id="imageTitle"></div>'),

Then just update it on slide change. You can add this into the offsetSlider() function.

            var newTitle = items.eq(index).attr("title");
            imageTitle.html(newTitle);

...aaaand style it in the css:

#imageTitle {
    color: #FFFFFF;
    width: 100%;
    text-align: center;

    bottom: 8%;
    left: 0;
}

@helixconcepts
Copy link

Can you please explain this in greater detail for folks like myself who don't have much experience with javascript. Thanks

@moiseevigor
Copy link

I've just committed the leecody proposal, check it out moiseevigor@1f3667a
Hope it helps!

@martinaglv
Copy link
Collaborator

I think you are missing a position:absolute; in your #imageTitle block.

Also, for bonus points, here is a quick way to add a dark background to the text, without changes to the markup or js:

#imageTitle::first-line {
    background-color: rgba(0, 0, 0, 0.8);
}

I am not sure which mobile browsers support it, but it works nicely in Chrome and it won't hurt in any case.

@Patrik-Iden
Copy link

leecody, ware exactly to put this code?

@Patrik-Iden
Copy link

Cant find the offsetSlider() function
any help, please. Thank you.

@ramchauhan
Copy link

Hello martinaglv,
Can i contrubute for this library , so that it can include a close button, show title, caption , alt and link to external resources.

Thnak you.

@Patrik-Iden
Copy link

Hello, ramchauhan. if you do this please let me know. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants