How do make sure that my $(document).ready( function() { ... } ) block executes?
A:
You can leave this up to jQuery. They test their code thoroughly. If you just want to know if it executed, simply throw an alert or something in there.
thenduks
2010-08-17 21:27:09
I did. And nothing happened. What are some ways to make sure that it will execute then. Firebug doesn't seem to reveal any errors.
syker
2010-08-17 21:30:42
@syker: Try restarting Firefox. I've had instances in which the Firefox Javascript engine did not produce consistent results until I restarted it.
Adrian Grigore
2010-08-17 21:33:18
Making sure it will execute is jQuery's job, once it's told to. If it doesn't execute, then it's not being set up -- that is, the code that'd set it up is not being executed. It'd be hard to help without seeing the code.
cHao
2010-08-17 21:33:26
It's a lot of code but basically my one file includes another PHP file that also has a $(document).ready( function() { ... } ) block. I'm seeing an example of my friend's code where his two $(document).ready( function() { ... } ) blocks execute just fine. Is there a Javascript checker I can download for Firefox?
syker
2010-08-17 21:50:47
Resolved my problem. I had too many unnecessary messages being logged to Firebug. Firebug did indeed log the error that I was experiencing.
syker
2010-08-18 00:00:08