Posts categorized as: design

5 Reasons Why I Love (and Am Sticking With) jQuery

by Matt Ward

December 20, 2010 in design Resources

In the same way that I think that it’s safe to say that WordPress has become the defacto blogging engine on the web today (and possibly the most popular content management package, period), it seems to me that jQuery has probably also become the nearly equally dominant JavaScript framework. At the very least, it seems to be the one we’re talking about the most.

I think that there are a number of different reasons as to why this would be. Altogether, it’s just a really awesome framework that readily and easily extends what we can do with client-side coding routines. In this article, I would like to look at the five key reasons why I have personally and enthusiastically adopted jQuery.

Selectors

jQuery’s ability to use CSS-like selectors in order to target certain elements or groups of elements within a document is, hands down, my absolute favourite feature. It’s just so incredibly useful. For instance, if I wanted to use CSS to style all the list elements in a list with the id of “mylist” I could do it like this:

#mylist li{ color : blue }

But let’s say I subsequently wanted to use jQuery to change the color of all these elements to red (likely based on some condition). Well, I could use the exact same selector syntax to accomplish this:

jQuery(“#mylist li”).css(“color”,“red”);

There are a couple of things that I really love about this. First, the familiarity makes the syntax very accessible and easy to learn for people who are familiar with CSS. This was the case with me when I first came to jQuery. I was already quite proficient with creating styles and had a solid understanding of how to target elements with selectors. Ultimately, this meant that I was able to pick up on jQuery’s selector syntax almost immediately, cutting down on the overall learning curve.

Read More
Page 17 of 24« First...1516171819...Last »