jQuery Troubleshooting tip

Sometimes a typo in a new rule can cause your jQuery to stop dead in it's tracks and can disable certain things around your sites. One great way I stay up on this easily is by placing the rule

	$("body").addClass("jQuery-script-js-ran");

at the very end of the jQuery file. Never put any code after this. If you don't see the class in your body tag, then you know something stopped your jQuery javascript from running fully. Likewise, if you see it there, you know everything's running smooth.


Comments

Thanks .. nice tips really it will help me out

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options