tooltip - JQuery Hover Tip -
I am trying to modify the following script to show / hide tip when "?" H
& lt; Ul class = "tips" & gt; Not placed on the entire page and the entire "li" block & lt; Li & gt; & Lt; A href = "#" class = "tooltip" & gt; & Lt; / A & gt; Feature 1 & lt; Div class = "tip" & gt; & Lt; H4 & gt; Tip title 1 & lt; / H4 & gt; & Lt; H4 & gt; Tip question & lt; / H4 & gt; & Lt; P & gt; Tip A & lt; / P & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" class = "tooltip" & gt; & Lt; / A & gt; Feature 2 & lt; Div class = "tip" & gt; & Lt; H4 & gt; Tip title 2 & lt; / H4 & gt; & Lt; H4 & gt; Tip question & lt; / H4 & gt; & Lt; P & gt; Tip A & lt; / P & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" class = "tooltip" & gt; & Lt; / A & gt; Feature 3 & lt; Div class = "tip" & gt; & Lt; H4 & gt; Tip title 3 & lt; / H4 & gt; & Lt; H4 & gt; Tip question & lt; / H4 & gt; & Lt; P & gt; Tip A & lt; / P & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ul & gt;
JQuery script
$ ("ul.tips li") hover (function () {$ (this). Find ("div"). Stop () .FadeIn () .css ("display", "block")}, function () {$ (this) .find ("div"). Stop (). FadeOut ()});
CSS:
.tips div {display: none; Status: Completed; Bottom: 0; Width: 100%; Height, auto; Background: # e00; Left: 0; }
I have tried to modify such a script
$ ("ul.tips li a") .Hover (function () {< / Code>
Therefore it targets the tag "A" but it is not showing anything.
You must eliminate the lines of your JS:
$ ("ul.tips li a"). Hover (function () {$ (This). ("Display", "block"); // and lt; - gotta semi-colon put}, function () {$ (This). Siblings ("div.tip"). Stop (). FadeOut (); // & lt; - here also}} ;
Comments
Post a Comment