如何挂钩几个 div 以悬停?我使用add()
但它不起作用。
var h1 = $('.a');
var h2 = $('.b');
var h3 = $('.c');
var all = h1.add(h2).add(h3);
all.stop(true, true).hover(function(){// not work
var this_id = $(this).filter('.a').attr('id');
// do something
}, function(){
...
});