Not sure how to add close on .mouseleave
I am using an accordion script and I would like to modify it to close when the users mouse leaves. So open on click close on mouse leave. The first one would be open by default on page load also. Can anyone help with this. I tried changing click to hover, which does 50% of what I want, but they do not close when the mouse leaves.
$(document).ready(function(){
$(".accheader:first").addClass("active");
$(".accwrap:not(:first)").hide();
$(".accheader").click(function(){
$(this).next(".accwrap").slideToggle("slow")
.siblings(".accwrap:visible").slideUp("slow");
$(this).toggleClass("active");
$(this).siblings(".accheader").removeClass("active");
});