javascript - thickbox javascript 函数

标签 javascript thickbox

我的站点使用了 thickbox,目前调用它的唯一方法是单击链接。无论如何要制作一个调用厚盒窗口的javascript函数?

Thickbox 网站:http://jquery.com/demo/thickbox/

我知道 thickbox 是 jquery,但我不太确定 jquery 函数与 javascript 函数有何不同,因为我相信 jquery 是 javascript?

最佳答案

如果你想打开绑定(bind)到thickbox的链接/图片,调用

$('#my-link').click();

对于所有其他情况,调用 tb_show 函数

tb_show('Custom title', 'http://jquery.com/demo/thickbox/images/single.jpg')

您还可以传递第三个参数来查找组中的所有图片

tb_show('Custom title', 'http://jquery.com/demo/thickbox/images/plant1.jpg', 'gallery-plants')

关于javascript - thickbox javascript 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6480847/

相关文章:

javascript - 当页面为 https 时,无法关闭 jquery iframe 厚盒

php - 使用 PHPThumb 和 Thickbox/Colorbox

javascript - 函数也是对象?

javascript - 有条件地将事件附加到仅出现在某些页面上的元素的最佳方法?

jquery - 如何打印JQuery ThickBox插件的内容?

javascript - 需要用 jquery 更改标记

javascript - 如何在 Controller 中捕获组合框 itemclick 事件

javascript - 使用 Angularjs 将动态数据从 Json 获取到 Html

javascript - 如何使用 Promise 循环异步调用

thickbox - 关闭thickbox并再次打开它