![]() ![]() ![]() Two syntaxes can be used for this: $( document ).ready(function() (Note that the DOMContentLoaded event was only added to IE in IE9+.) This allows you to run code as soon as the document is ready to be manipulated.įor example, if a browser supports the DOMContentLoaded event (as many non-IE browsers do), then it will fire on that event. JQuery’s $(document).ready() method gets called as soon as the DOM is ready (which means that the browser has parsed the HTML and built the DOM tree). ![]()
0 Comments
Leave a Reply. |