2012-04-03 69 views

回答

2

打開參數設置爲true。 (它默認爲false);如果想要延遲,你需要間隔一段時間寫javascript。

1

您可以將打開的屬性設置爲true

<script type="text/javascript"> 
    $(document).ready(function() { 
     //For url 
     $.fn.colorbox({href:"example.html", open:true}); 

     //For link 
     $("a.example").colorbox({open:true}); 

     //For delay 
     setTimeout("$.fn.colorbox({href:'example.html', width:500, height: 300, 
     open:true});", 3000); 

     //For inline 
     $.fn.colorbox({inline:true, width: 660, height: 405, href:"#example"}); 
}); 
</script> 

下面是文檔:jacklmoore.com/colorbox