Make disappear after X seconds, if no movement? Jquery/Ipad -


I know what code to use to create some code, before x fax before x seconds ..

 <. Code> $ ('div # extras') delay (800) .fadeOut (3000);  

But it's for the iPad, & amp; I would only want to fade it out if the user did not take anything or touch for 2 seconds or more.

I can not use it at all ... any thoughts?

For any interest .. What did I do:

  // Show the menu menu ('touch') if the user touches the page. Bind ("TouchStart", Function (E) {$ ('Div # Extras'). Stop (). Feedto ('Sharp', 1);}); // If the user starts the page, menu menu $ ('. Touch'). Bind ("touchmov", function (e) {$ ('div # extras'). Stop (). Feedto ('sharp', 1);}); // If the user does not touch or move the page, then the fade menu $ ('. Touch'). Bind ("touch", function (e) {$ ('div # extras'). Delay (2000). FadeTo (1500, 0);});  

Thank you for all your help

  ( Function () {var timerId = null; $ (document) .bind ('mousemove mousedown mouseup', function () {$ ('div # extras'). Show (); Clear timeout (timer id); timerId = setTimeout Function () {$ ('Div # extras'). FadeOut ('slow');}, 2000);});} ());  

Comments