复制右键单击灯箱的操作,就像在github.com上一样
Duplicate the right click lightbox action, like on github.com
我正在尝试复制右键单击徽标以激活灯箱的操作(使用Colorbox的内联功能)
这适用于正常的左键点击:
<h1 class="logo d1"><a href="#inline_content" class="inline"><?php bloginfo('name'); ?></a></h1>
我想做的是:
<h1 class="logo d1"><a href="<?php get_home_url(); ?>" class="inline"><?php bloginfo('name'); ?></a></h1>
右键单击(可能)将href更改为#inline_content?
我对javascript有点陌生,也许我的做法不对?
如果将{open:true}添加到colorbox语句中,它似乎可以工作:)
右键单击使用键代码3。(这当然是使用jQuery)
$('.logo').mousedown(function(e) {
if (e.which === 3) {
//alert('right clicked!');
$(".inline").colorbox({ inline:true, width:"50%" });
}
});
相关文章:
- Firebase2(Firebase.google.com)推送通知-从外部管理
- 通过另一个php应用程序将我的项目推送到Github存储库中
- 实现一个建立在google.com之上的自定义搜索引擎
- 使用带有.net autopostback的ryanfait.com自定义表单元素
- parse.com类中指针中的查询指针
- http://oauth.googlecode.com/svn/code/javascript/oauth.js已关闭,
- 从Parse.com返回的格式化日期
- 如何通过justinaguilar.com设置动画延迟?[解决]
- 使用Parse.com查询制作新闻源
- 如何使用Parse.com JavaScript SDK上传图像
- 复制右键单击灯箱的操作,就像在github.com上一样
- 如何为补间分配额外的属性.js ( https://github.com/sole/tween.js/ )
- 无法使用库 https://github.com/hiddentao/linear-algebra 运行简单示例
- 如何修复错误;“错误:引导工具提示需要系绳 (http://github.hubspot.com/tether/)”
- 如何试用最新的JS interop?https://github.com/dart-lang/js-interop.
- Rails:找不到JavaScript运行时.看见https://github.com/sstephenson/exec
- https://github.com/jedfoster/Readmore.js
- 包括来自raw.github.com的js
- jQuery表单验证- https://github.com/victorjonsson/jQuery-Form-Val
- 在Greasemonkey用户脚本中监听github.com PJAX事件