I have this line of code:
$(\'#sitesAccordion .groupOfSites\').click(function() { var lastOpenSite = $(this).siblings().hasClass(\':not(.closedTab)\'); c
Use the not function instead:
var lastOpenSite = $(this).siblings().not('.closedTab');
hasClass only tests whether an element has a class, not will remove elements from the selected set matching the provided selector.
hasClass
not