top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Calling hover event of an element when hover event of another element is called?

0 votes
329 views

I'm trying to call the hover event of the buttons placed on a tile when I hover over the tile, using jQuery. However, it is not working. This is the code I'm using

<script >
$( "#tile1" ).hover(function() {
    $('.btn-danger').hover();

 });

</script>

I've linked with jQuery separately in the head:

<script src="http://code.jquery.com/jquery-1.10.2.js"></script>

Can anyone point out what the problem might be?

posted Jun 25, 2014 by Rajneesh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Try this:

$("#tile1").hover(function(event) {
  $('.btn-danger').trigger(event.type);
});
answer Jun 27, 2014 by Vrije Mani Upadhyay
...