I am using the accordion plugin, and when a user click anywhere on the page that is not the accordion I want the accordion to collapse any open lists.
The code I have below works in the sense that it collapses the accordion, but it still collapses it wheni click on it.
What I am lookin for (i think), is a selector that will select everything, and then remove things like #accordion, and any li's that are related to the accordion.
$('html').not('#accordion, li').click(function(){
collapseAll();
});
SOLVED
Use jQuery to hide a DIV when the user clicks outside of it
Just incase anyone stumbles across this question, i found my answer here ^^