Hey all,
I need to run some jQuery after the page loads because of a minor bug in a pre-packaged theme. Basically what I'm doing is replacing one class with another after the theme loads (the class is set dynamically in the pre-packaged theme but there's a bug I believe in the PHP part that it's putting in a typo). As a new member to the community, I will inform the programmer. But I have to do a quick fix in the next few days.
For the code development, I just placed the script at the bottom of the page but I want to place it in the document.ready but I think Drupal uses one already in the Drupal.js and that Drupal does something different.
Can anyone help?
Here's the code snippet.:
if (document.getElementById("menu_top")) {
$("#navigation > del").removeClass('move-');
$("#navigation > del").addClass('move-center');
}
Thanks
Comments
Just stick it in. See
Just stick it in. See http://www.learningjquery.com/2006/09/multiple-document-ready . You can have multiple $(document).ready() calls.
Great thanks
I only have one more question I'm posting on the post and hopefully that should be it. It's just getting over the Drupal installation hurdle. I hope to contribute to the board as well.