Originally Posted by jerdev
How come that simple code of yours worked?
Look at the (horribly simple-minded) code:
<img src="/gifs/clickhere.gif" name="clickhere" id="clickhere"
width=400 height=400 border=1>
First of all, the return false
is totally unnecessary here.
So all that is really happening is that every time that <img> tag sees a "mouseup" it calls the function clickit()
And that being the case, you can emulate the mouseup by, of course, calling clickit()
Besides the ways that LogicAli noted, you could also simply do
Yes, it works. I tested it. Or you can do it the other way around:
You have to call clickit() once to get their timer to start working, but you can then just set the number of clicks to anything you want.