2012-04-03 15 views
1

ColorBox(jqueryポップアップスクリプト)を自動的に実際に 'ポップアップ'にする方法はありますか?もしそうなら、私はその部分を編集しますか? ホームページに約3秒後にポップアップが必要です。感謝! ありがとう!ColorBox - 自動ポップアップ(やり方)

答えて

2

オープンパラメータをtrueに設定します。 (デフォルトはfalse)。遅れが必要な場合は、間隔を置いて少しのJavaScriptを書く必要があります。

1

オープンプロパティをに設定すると、に設定できます。ここで

<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

関連する問題