Home › Forums › JavaScript › JQuery and ‘this’ keyword › Re: JQuery and ‘this’ keyword
March 4, 2010 at 6:28 pm
#72039
Chris Coyier
Keymaster
$(this) becomes a jQuery set, and thus is able to have jQuery functions performed on it. At least that’s how I understand it. With "this" by itself, that’s a reference to the element, and you have direct access to DOM stuff like this.offsetLeft or whatnot, but you don’t get all the fun jQuery abilities (like chaining, e.g. $(this).addClass("yeah").slideDown(); ) I’m not even sure if this.addClass(); will work… did you try it?