Introducing the jQuery JunkBox

I’m adding something new to the blog. Each post will now contain a tid-bit of jQuery knowledge. You will see it at the bottom of this one. In it will be little bits of jQuery…methods and how to use them, pointers, pretty much anything. By doing so, hopefully you will learn something, and I will too, by doing it. And it all starts tonight!

Oh, and I hit 13 subscribers! Go me!

jQuery junkBox

.prevUntil();
This method will return ALL siblings previous to the element with class ‘slide’, until it comes to a ‘ul’, and give it the color style of black. If it never hits a ‘ul’, then ALL previous siblings get the color black.

$('.slide').prevUntil('ul').css('color', '#000000');

Tags: ,

One Response to “Introducing the jQuery JunkBox”

  1. Awesome! Looking forward to those. I think I learn more from little tidbits like that than anything else.

Leave a Reply to Joseph McCullough