html - jquery hover function -


The following code needs to be changed, so when onmouseover firefalls the event appears on the right side of a div hyperlink?

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://code.jquery.com/jquery-latest.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ('a.moreDetails'). Hover (function () {$ (this) .next (). Toggle ('sharp');});}); & Lt; / Script & gt; & Lt; Body & gt; & Lt; A href = "#" class = "more details" & gt; (Details) & lt; / A & gt; & Lt; Div class = "description" & gt; User 1 & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; JQuery's hover method takes two functions:  
 

$ ("A.moreDetails") hover (function {$ (this) .next (). Show ('sharp');}, function () {$ (this) .next (). Hide ( ' fast ');});

You can mark your closing & lt; / Head & gt; Do not miss the tag to appear next to your link in your element, some markup-change, JavaScript manipulation, or some CSS rules will be required. You can make this minor change:

  & lt; A href = "#" class = "more details" & gt; (Details) & lt; / A & gt; & Lt; Span class = "details" & gt; User 1 & lt; / Span & gt;  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -