I recently came across this amazing jQuery plugin for creating slide-out and drawer effects:
However, I encountered a problem. I want to automatically close the active 'drawer' when the mouse is not hovering over any element. The jQuery plugin currently keeps the active drawer open until the mouseover event occurs on another drawer element. How can I make all the drawers close when none of them are being hovered over?
Here is my initialization code:
$(function () {
$('UL.drawers').accordion({
// specify the drawer handle
header: 'H2.drawer-handle',
// define our selected class
selectedClass: 'open',
// trigger the effect on mouseover
event: 'mouseover'
});
});
In addition, I noticed that when I add the 'open' class to the drawer element's CSS (.drawer-handle.open {}
), the color animation for the active drawer handle does not function as expected. Any thoughts on why this might be happening? I am using PHP within Joomla 1.7.
Thank you in advance!