Do you use the .ready() function?
11/09/2015 9:22 AM by
jQuery exposes a .ready event which fires when the Document Object Model (DOM) is fully loaded and ready to be manipulated.
You can attach a function to this event so you can be sure the page is ready for you to work on.
Figure: Bad Example - if this jQuery is in the wrong place, the #login element may not exist!
Figure: Good Example - this code won't run until the DOM is fully loaded
Do you feel this rule needs an update?