jquery centering span on image hover (because it is inline maybe?) -
When the content comes to the user, I am trying to make fancy hover effects when the content appears. I want the bubble to be centered and go to the top of the images.
Illustrated in this Bela:
In Chrome it is particularly bad, where the duration is automatically turned on to display: Inline hover behavior differently from Firefox Does the block element help in both form but the hidden elements are pan and it is displayed automatically: inline. Any thoughts and hover about fixing this problem appear directly at the top of the right pictures?
Thank you!
and inside jquery I just added: You can also try: all your In any case, your icons have an alt attribute Why do not span the text in each image: (Add a alt details text to images (no CMS editor allows you to.) and use my script: PS: I was just given the name in your CSS: CSS change:
#features_icons li span {top: 0; To set in / * /// Chrome, go to /// * / left: 0; / * /// Added to fix in Chrome /// * / white-space: nowrap; / * /// Added this line // / * /} # feature_conle (status: relative; / * /// This line was added /// * /}
external dimension (true) get correct dimension To:
spanW = ($ (this) .next ("span") External Wide (true) / 2) - ($ (this). Otterwidth (true) / 2 );
& lt; SPAN & gt; Remove elements A different perspective:
& Lt; Img alt = "air conditioning" src = "http: console.png" />
You can remove all your span, & lt; Body & gt; Tag:
& lt; Div id = "tooltip" & gt; & Lt; / Div & gt;
$ ("ul # features_icons li img"). Hover (function () {var altteext = $ (this) .attr ('alt'); var thisW2 = $ (this) .terwidth (true) / 2; var it posl = $ (this) .offet (). Left + ThisW2; var This POST = $ (this) .offet (). $ ('# Tooltip'). $ ('# Tooltip'). Text (altteext); var tool W2 = $ ('# tooltip') External Wide (true) / 2; (1) .FadeTo (200,1) .css ({left: (ThisPosL-toolW2, top: thisPosT})}}, function () {$ ('# tooltip'). FadeTo (100,0, function) {$ (This) .hide ();});});
alt text
# tooltip
set the status of #tooltip
#features_icons li SPAN {
to
#tooltip { < / Div>
Comments
Post a Comment