开发者

JQuery Overlay - Change OnClick to OnMouseOver

开发者 https://www.devze.com 2023-04-11 06:56 出处:网络
I am using a jQuery overlay, like this one: $(\"a[rel]\").overlay({ mask: \'#EFEFEF\', close: \"a.closeOv开发者_如何学PythonerlayBtn\",

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

精彩评论

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