The jQuery itself is fine. Just a couple of things to watch out for:
1. You can only execute most jQuery code after the DOM has fully loaded. Almost all of your code should go in:
2. If you're using any other Javascript libraries, they may have taken control of the $ keyword. If that's the case, use jQuery instead of $ (i.e. jQuery(document).ready(function() { )Code:$(document).ready(function() { // code here });
Results 1 to 4 of 4
Thread: Do I have a syntax error?
Hybrid View
- 31 Jul. 2011 11:18pm #1