我想通过悬停一个元素来触发另一个元素的悬停,如下所示:
$(document).ready(function () {
$('.quarter h3').mouseenter(function () {
$(this).next().trigger('mouseenter');
});
});
HTML是:
<div class="quarter grow">
<a href="#">
<h3><span>titel 1</span></h3>
<img src="http://lorempixel.com/200/230/people/1" alt="">
</a>
</div>
看看小提琴:http: //jsfiddle.net/KkYGC/