2009-12-20 70 views
0

我使用facebox调用jQuery的facbox点击

,让帮助从链接

开箱,但我想从jQuery的点击功能从超链接打开盒子不。 。

像 $( “#将Button2”)点击(函数(){ 代码 开facebox });

感谢

回答

2

$("#Button2").click(function() { 

    // to load html/php page 
    jQuery.facebox({ ajax: 'remote.html' }); 
    jQuery.facebox({ ajax: 'remote.php' }); 

    // load image 
    jQuery.facebox({ image: 'images/dude.jpg' }); 

}); 
2

是这样的:jQuery.facebox( '你好')

+0

是为我工作。我们可以调用其他html或php文件吗? – air 2009-12-20 08:13:48

+0

当然,用jQuery.get() – jspcal 2009-12-20 08:28:25