I have this line of code:
$(\'#sitesAccordion .groupOfSites\').click(function() { var lastOpenSite = $(this).siblings().hasClass(\':not(.closedTab)\'); c
jQuery's hasClass() method returns a boolean (true/false) and not an element. Also, the parameter to be given to it is a class name and not a selector as such.
hasClass()
For ex: x.hasClass('error');
x.hasClass('error');