javascript - jQuery Follow the cursor horizontaly with a DIV -


Cutting the container, I need to follow the cursor horizontally in the div I

Any such

but the above link

Em> are both vertical or horizontal I do not want to

I have created a demo

  $ ("#dh- thumb> li"). Hover (function () ($ ("div"). Show ();}, function () {$ ("div"). Hide ();}); $ ('# d-thumb » Season (function (e) {$ ("div"). CSS ({left: e.pageX - 120});});  
  & lt; Script src = "https://ajax.googleapis.com/ajax/libs/JQuery/1.1.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Ul id = "da-thumb" class = "da-thumb" & gt; & Lt; Li & gt; & Lt; A href = "" & gt; & Lt; Div & gt; & Lt; Span & gt; Menu by Simon Jensen & lt; / Span & gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; & Lt; Div & gt; & Lt; Period & gt; Mr. Crabs by John Janlowe & lt; / Span & gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

 (code) $ ( "# Da-thumps take"). Hover (function {$ (this) .find ("div"). Show ();}, function () {$ (this) .find ("Div"). Hide ();}); $ ('# Da-thumpbs li'). MouseMove (function (e) {var $ this = $ (this); $ this.find ("div"). CSS ({left: e.pageX - $ this.position (.left - 120});}) ;  

Here is the code to work on.

But with this you will completely lack the "easy" / animation which is the demo you have added. If there is something that you want you to use a different approach if yes, then maybe there is something I can help you too.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -