StuBlackett
StuBlackett

Reputation: 3857

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.

Upvotes: 0

Views: 305

Answers (1)

Tats_innit
Tats_innit

Reputation: 34107

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');

});​

Upvotes: 1

Related Questions