开发者

JQuery Overlay - Change OnClick to OnMouseOver

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜