jQuery Archives

How to combine DOM elements in jQuery

Sometimes you want to add your own DOM element to an existing class or ID. For example, maybe you’d like to insert something like a header advert into an existing theme without having to hack core files. jQuery makes this possible. You can either add your own element to the beginning or the end of … Read more

How to use jQuery UI elements in the WordPress admin interface

One thing I’ve been struggling with was to use jQuery UI elements in my plugins, for example jQuery UI Tabs. Even though the libraries are included with WordPress, I couldn’t get them to work. Thanks to Pippin’s Plugins I could figure it out – thanks, Pippin! My initial mistake was the way I created the … Read more

How to use jQuery in WordPress

On a standalone (non-WordPress) project you’d import the jQuery library in the head tag, then call a jQuery function towards the bottom of your file. This approach isn’t working in WordPress. Since jQuery and many other useful libraries are already part of WordPress, there’s no need to link to your own copy. Instead, you need … Read more