简体   繁体   English

带有动作的颜色框内的元素

[英]element inside a colorbox with an action

How can i improve my colorbox element with an action. 如何通过操作改善我的colorbox元素。 Want to call a new colorbox after cliking in an element on my existing colorbox. 想要在我现有颜色盒中的某个元素上单击后调用新的颜色盒。

Thanks in advnc 感谢advnc

The easiest way to implement that sort of functionality is by putting something like this into your document ready function: 实现这种功能的最简单方法是将以下内容放入文档就绪函数中:

$('a[rel="colorbox"]').live("click", function() {
    $.colorbox({
        open: true,
        href: this.href
    });

    return false;
});

This will load the target of any <a> tag with the rel="colorbox" attribute in your colorbox whether the link be in your main page or in your colorbox content. 无论链接是在主页还是在色箱内容中,这都会在rel="colorbox"使用rel="colorbox"属性加载任何<a>标签的目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM