Friday 15 February 2013

javascript - Simulate right key event every 5 seconds -


I'm trying to simulate the keyboard press that happens every five seconds, I have the following code but it gives me a Giving the error, can someone help me, which is going wrong here?

  window.setInterval (function () {var e = jQuery.Event ("keydown"); e.keycode = 39; jQuery ('body'). Trigger (E);}, 5000);    

use

  var interval = setInterval (function () {CallYourFunction ();}, 5000);    

No comments:

Post a Comment