用鼠标悬停而不是单击来触发fancybox? [英] Trigger fancybox with hover instead of click?

查看:80
本文介绍了用鼠标悬停而不是单击来触发fancybox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让fancybox在鼠标悬停在链接上时触发.

I'm trying to get fancybox to trigger when the mouse is hovered over a link.

虽然运气不好...有什么建议吗?

Have had no luck though... any suggestions?

$(document).ready(function() { 
/* This is basic - uses default settings */     
    $("a.inline").fancybox({ 'hideOnContentClick': false });    
});

推荐答案

一种方法是在触发悬停事件时触发点击.

One way would be to fire the click when the hover event is triggered.

$("a.inline").fancybox().hover(function() {
    $(this).click();
});

这篇关于用鼠标悬停而不是单击来触发fancybox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆