Thursday, 12 September 2013

How many times does this code run?

How many times does this code run?

I'm testing some code and I assume the code below will run the
'somefunction()' every 2 seconds. However, it only runs once..... why is
this?
$(document).ready(function () {window.setInterval(somefuntion(),
2000);});

No comments:

Post a Comment