jQuery Crash Course : Comments
October 8, 2007
Comments
Excellent article with a very interesting sample piece. I like that you didn’t stick with something extremely simple and showed many aspects of the power of jQuery. Obviously, even with this example, you have only scratched the surface of the possibilities – but you sure did cover a good amount of ground in regards to is syntax, methods, and chainability.
Nice work. So, you starting a new airline company?
Great Read. I think this article actually does a better job articulating the why should I use, ease of use, and the power of using jQuery than jQuery’s actual site. I wish this article had been written when I was first getting started with jQuery, and JS libraries in general.
This is a fantastic tutorial. As Nate mentioned above, it’s great that the example has some complexity to it. The whole thing — both the article and the demo — appear very polished. Clearly a lot of work went into this. Well done!
Nice article. As for the last section — using JS to interact with forms — see Mike Alsup’s excellent Form plugin for jQuery: http://malsup.com/jquery/form/
It’s the first place to start (IMHO) when building an interactive Web App with jQuery.
Great article. Nathan’s removed any apprehension I may have had undertaking a move out of the designer’s chair and into making things happen on the page.
@Nate Klaiber: Haha, no. I’m not actually going into the airline business. Far too many headaches in that industry.
@Sean O: Agreed, Mike’s jQuery form plugin is amazing.
Great article! Simple but clearly sorted out! It made me very eager to learn more about jquery. It is a very good article for newbie to know about jquery!
And airline example in an article called “crash course.”
Interesting choices. :-)
“The greatest thing is style — a mark of genius, for to make good metaphors implies an eye for resemblances.” – Aristotle.
;)
Awesome tutorial.
Too often i find online tutorials leaving me unsatisfied, only scratching at the surface of their topic – but here is some meat and bones, showing a practical and complex example of the different ways to approach a realistic subject.
Digital web comes up trumps again, putting value into the content.
Thank you!
Does this actually work?
It looks like thisRow is a jQuery object, but the next lines are using it like a DOM array.
var thisRow = $('#passenger_details tr');for (var i = 0, j = thisRow.length; i < j; i++){if (thisSeat == thisRow[i].className) {
Danny: A jQuery object still has a length property (to allow you to count the number of matching elements), and can be treated as a DOM node in certain ways.
Matthew:
Thanks. You, of course, are right. I’ve been using jQuery long enough that my brain automatically does things like thisRow.each(function(){ this.className...}) that I forgot that a jQuery object is an array of DOM elements, at least since 1.2 or so…
I still use $(...)[0] to get the first element; I just never think about using the rest of the array…
Does anyone know if each is that much slower?
Looks like textile ate my comment.
I meant to say that I use $(..)[ 0 ] to get the first element
It’s a much more practical tutorial than many others I’ve seen, but I can’t help thinking that while it undoubtedly does show off some of the beauty of jQuery, the huge 240KB footprint (mostly HTML) of the final page doesn’t exactly scream “best practice”!
Marcus: Good point. The page could’ve been lighter, with Ajax calls to fill in some of the more dynamic functionality. At that point though, there’s sacrifice on accessibility. It’s a balancing act, and for the sake of the demo I made it all one HTML page.



You can use this
feed to keep up with the comments made on this article.