StuBlackett StuBlackett - 1 month ago 17
jQuery Question

jQuery Trigger a click on mouseOut

I have tabs setup, Which animate on hover. What I want to do is on mouseOut, Trigger a click on the tab that has the class of "home".

My current jQuery is as follows :

$('div.vertical_tabs ul.st_tabs li a').hover(
function() {
$(this).trigger('click');
}, function() {
$(this).trigger('click');
});


The class I'd like to trigger on mouseOut is : div.vertical_tabs ul.st_tabs li a.home

Is this possible?

Thanks in advance.

Answer Source

Hiya demo http://jsfiddle.net/g97D8/ or http://jsfiddle.net/g97D8/1/

for mouse out you can use mouseout event.

Please let me know if I am missing anything.

Jquery code

$('.tag').mouseout(function() {
         alert('foo');
            $('.tag1').trigger('click');

});‚Äč