Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery酒醉触发手动切换_Jquery_Tipsy - Fatal编程技术网

jquery酒醉触发手动切换

jquery酒醉触发手动切换,jquery,tipsy,Jquery,Tipsy,tipsy是一个很棒的jQuery工具提示插件,比如facebook。这对许多选项都有效,但我在工具提示(rel方法)中打印mypage的链接。现在,如果用户在我的链接中单击,我需要显示工具提示,如果用户在页面正文中单击,或者在工具提示/隐藏工具提示的外部单击,我需要复制当前页面的链接(我在工具提示中输入)工具提示。在醉酒文档(手动触发示例)中,如果我们将此链接更改为1个链接(toogle/单击show/单击hide)或更改单击正文/外部,则仅使用显示/隐藏链接(2个链接)触发链接。我想我的问题

tipsy是一个很棒的jQuery工具提示插件,比如facebook。这对许多选项都有效,但我在工具提示(rel方法)中打印mypage的链接。现在,如果用户在我的链接中单击,我需要显示工具提示,如果用户在页面正文中单击,或者在工具提示/隐藏工具提示的外部单击,我需要复制当前页面的链接(我在工具提示中输入)工具提示。在醉酒文档(手动触发示例)中,如果我们将此链接更改为1个链接(toogle/单击show/单击hide)或更改单击正文/外部,则仅使用显示/隐藏链接(2个链接)触发链接。我想我的问题已得到解决。有办法解决这个问题吗?谢谢

酒醉触发:

<div class='caption'>Manual triggering example:</div>
<div id='manual-example' class='example'>
<a rel='tipsy' title='Well hello there'>My tooltip is manually triggered</a> |
<a href='#' onclick='$("#manual-example a[rel=tipsy]").tipsy("show"); return false;'>Show it</a> |
<a href='#' onclick='$("#manual-example a[rel=tipsy]").tipsy("hide"); return false;'>Hide it</a>
</div>
手动触发示例:
|

您可以使用此代码在状态之间切换:

var el = $('#manual-example a[rel=tipsy]').tipsy({trigger: 'manual'});
$('#toggleIt').click(function(e){
    e.preventDefault();
    if($('.tipsy').length == 0){
        el.tipsy('show');
    }else{
        el.tipsy('hide');        
    }
});

您可以使用此代码在状态之间切换:

var el = $('#manual-example a[rel=tipsy]').tipsy({trigger: 'manual'});
$('#toggleIt').click(function(e){
    e.preventDefault();
    if($('.tipsy').length == 0){
        el.tipsy('show');
    }else{
        el.tipsy('hide');        
    }
});