Skip navigation

How to use the WordPress bundled jQuery.

If you want to use the WordPress bundled jQuery it’s not that hard. After you include wp_enqueue_script(‘jquery’);

Just add your jQuery code using ‘jQuery’ instead of ‘$’ like so:


jQuery(document).ready(function() {
jQuery('#togglediv').hide();
jQuery('a#toggle').click(function() {
jQuery('#togglediv').toggle(400);
return false;
});
});

Remember ‘jQuery’ is case sensitive.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: