Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Steven Parker228,978 Points
"$()" is a shorthand for "jquery()".
Here's an excerpt from the jQuery API manual:
jQuery()— which can also be written as
$()— searches through the DOM for any elements that match the provided selector and creates a new jQuery object that references these elements: If no elements match the provided selector, the new jQuery object is "empty"; that is, it contains no elements and has .length property of 0
In this case, the empty jQuery object is being used to access the w2grid method of the w2ui jQuery plug-in.
Leandro Severino12,674 Points
Thanks! I'm just confused coz I don't know the reason(yet) for using "$()" which just returns an empty set.