The following piece of code can be used to set a timer using jQuery: $(document).ready(function() { window.setTimeout(function() { // some code }, 500); });
Articles Tagged: Exists
Check if an Element Exists
To check whether an element exists, you can write the following code: if ($(“#someElement”).length) { //The DOM element exists } else { //The DOM element doesn’t exist }