Categories
Using JQuery in WordPress

How to use JQuery with WordPress

JQuery is a very popular Javascript library that provides simple yet powerful tools to simplify client-side scripting of HTML. It can be an asset to know how to use JQuery with WordPress. For those developers who know it through and through, it can transform a website from being good to being great. Because we all know that a website that is interactive is a website that people stay on longer and re-visit frequently. I will admit that I’m no where near a JQuery master but I have learned enough to use it’s capabilities within WordPress.

Why Would Anyone Need To Know How To Use JQuery With WordPress

Anyone who has every worked on a pre-made theme or who is building a custom theme from scratch knows that there are some things in WordPress that are hard to get to. Whether it be plugins, widgets, or you simply can’t find where the developer put that piece of code. JQuery can help with this! Let’s give you an example. Recently while working on an e-commerce website, I stumbled upon a piece of code that for the life of me I couldn’t find. I really wanted to add the Responsive Columns classes from Twitter Bootstrap onto this specific div. So I leveraged the search and destroy power of JQuery and accomplished my goal.

The Solution

Ok…great for me…now how did I do it so you can do the same thing in your themes. I promise you that the more familiar you get with this wonderful tool the more reasons you are going to find to use it!