For those who’re including some further jQuery to customise your WordPress website and it doesn’t appear to be working, keep in mind that the copy of jQuery that WP masses is in “no battle” mode.
For those who’re trying to make use of the default jQuery shortcut of $, you then’ll wish to wrap it with the next:
jQuery(doc).prepared(perform($) {
// $() will work as an alias for jQuery() within this perform
});
It will prevent a whole lot of time beating your head towards a wall, questioning why your jQuery isn’t working. 😉
Supply: WordPress Codex
0
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!