我的站点使用了 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/