I am using a jQuery overlay, like this one:
$("a[rel]").overlay({
mask: '#EFEFEF',
close: "a.closeOv开发者_如何学PythonerlayBtn",
closeOnClick: false
});
This works by clicking a link, like this one:
<a href="foo" class="bar" rel="#overlay1">baz</a>
How can I modify this to work by onmouseover
instead of onclick
?
You could trigger the click event onmouseover.
$('a[rel]').mouseover(function(){
$(this).trigger('click');
});
精彩评论