jQuery ready function doesnt work
-
The ready function of jQuery doesnt work for me.
Right under <?php wp_head(); ?> I placed this jQuery code:<script type="text/javascript" src="path_to_jquery/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { alert ("test text"); }); </script>
The alert (with the text “test text”) is not popping up immediately! It’s only popping up after my sitebar has been loaded. This means while I’m seeing the index page (sitebar is not loaded yet) I have to wait until the sitebar has finished loading, and only then the jQuery code is executed: the alert is popping up.
Why?
- The topic ‘jQuery ready function doesnt work’ is closed to new replies.