Closed mrbinky3000 closed 11 years ago
Oops. It is switched. Should read:
$('ul', '.sidebar').hide()
In all honesty, the performance hit will be negligible in 99% of the stuff we build; more wanting to bring consistency to how we write $ selectors.
https://github.com/LukeAskew/Front-End-Standards/blob/master/JavaScript/jQuery.md
The first example $('.sidebar', 'ul').hide() is used as a "bad" example.
It is really really bad, because it doesn't select anything. :-) I stuck it in a page and the jquery selector draws a blank.