How to know if jQuery is loading

Events happening in the community are now at Drupal community events on www.drupal.org.
michaels23's picture

Hi all,

I'm starting to suspect jQuery isn't loading on some of the pages of https://test.cgsi.org . JQuery is something I take for granted, so I have no clue how to determine if it's actually loading. Can anyone suggest some trouble-shooting ideas.

Many thanks in advance!

Comments

Looks okay to me

davidneedham's picture

Why do you think it's not working?

The best place to check something like that is the console. In Google Chrome, just open an inspector window and click on console at the top tab. I see that the jQuery script is being loaded successfully (via the resources tab) and I don't see any errors in the console in Google Chrome.

--
David Needham
Team Lead of Training at Datadog

Thanks for the excellent info!

michaels23's picture

Thanks David. That's exactly what I needed to know.

I was starting to worry about jQuery because the 'other' js file that you see loaded on that page can't seem to understand the $(document).ready syntax. I thought that was jQuery related.

I also noticed that none of the main-menu items (e.g., Publications) 'expand,' even though I've checked their 'expanded' boxes at admin/menu . I haven't dug into that, but hoped any jQuery problems might also be the cause.

Mike Steigerwald

No problem!

davidneedham's picture

For what it's worth, "expanded" actually refers to a very limited use case and is never what people expect it to be. :-) If you had the default menu block on the sidebar, selecting a parent link as "expanded" will always open the fieldset to show the children within that parent page.

--
David Needham
Team Lead of Training at Datadog

michaels23's picture

At the risk of hijacking my own thread for a tangent topic, shouldn't I at least see something like a .expanded class for the ul or li items for an expanded menu?

Mike Steigerwald

Twin Cities

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: