2009-12-20 34 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