How using JQuery could help speed up your blog

The world of blogging has certainly become easier and more approachable for all types of people. No longer do you need to know how to manually code HTML, PHP, or JavaScript in order to create, design, and maintain a blog. But, for some of us, we may want to go further than what the blogging platform, or the available plugins allow. We may need to add more functionality for our users, or to integrate a new function that simply isn’t available yet through those easy to use tools. That’s when we have to be ready to learn some coding and get our hands dirty, plunging into code. Fortunately, even then there are tools to help us. When writing JavaScript, for example, here’s how using JQuery could help you write faster, and speed up your blog.

JQuery is a JavaScript library available from the project’s web site, and is designed to simplify your web site. It changes the way you write code, so that it makes more sense, it can be done in less time, and it makes the whole page work more efficiently. To start, all you have to do is download the library, and add the file to the same folder where the rest of your site resides. Then, at the top of your page, you add a reference to that library:

Once that’s done, you can start using JQuery code instead of normal JavaScript. There is a learning curve, of course, but once you get familiar with the way JQuery does things, you won’t want to go back. Their site has a lot of tutorials on how to use this language, and the language has quickly become a staple of online use. Some stats show that close to half of all top web sites are now using JQuery to speed up their own pages.The library not only speeds up the development of sites, but also maintenance, since there’s less lines of codes, and it’s easier to find what you’re looking for, should you go back and want to change something.

To show you just how much more efficient JQuery is, let’s take a common example of something you may want to do in JavaScript. Here’s the code for reading the value of a cookie using nothing but pure JavaScript:

To contrast that, here’s the code when using JQuery:

As you can see, the difference is quite drastic. Of course, not every comparison will give you such as huge improvement, but in most cases it will make things easier for you. Overall, using JQuery is a great idea if you’re set on going down into your code and tweaking the blog yourself. It makes things so much easier, and helps the performance of your pages tremendously.

Author: Patrick Lambert

Comment with Your Facebook Account


  1. If you are doing your own theme editing, I’d recommend using the enqueue function built into WordPress which prevents multiple instances loading jquery, especially if you have plugins which use it. (Loading multiple copies could slow down your site and create conflicts.)

    wp_enqueue_script( ‘jquery’ );

    You also need to know that all lines of code are not created equal. So easy for you (fast to write), doesn’t necessarily translate to fast to run. (Luckily jQuery does a good job of trying to be fast.)

  2. Adoro me mostrar peladinha na web cam

Speak Your Mind


Please prove you're human *