Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: BP throwing jQuery error trying to close sitewide notice on homepage?

@rossagrant

Participant

When I google that error I see posts referring to WP running it’s jQuery library in no-conflict mode.

People say that errors like this are syntax issues – the jQuery library included with WordPress loads in “no conflict” mode. This is to prevent compatibility problems with other javascript libraries that WordPress can load. In “no-confict” mode, the $ shortcut is not available and the longer jQuery is used, i.e.

jQuery(document).ready(function ($) {

By including the $ in parenthesis after the function call you can then use this shortcut within the code block.

This is a bit beyond me – does anyone else see this behaviour and have any idea if the above solution is implemented in BP to cause no conflicts?

Would love some help!

Ross 🙂

Skip to toolbar