2

ページが読み込まれると、何もクリックせずにポップアップが表示されるようにしたいと思います。

微調整や自動実行アクションはありますか?

$(document).ready(function(){           
   var methods = {
      autoclose : function(){
         $.fallr('show', {
            buttons   : {},
            content   : '<p>This is a video</p><iframe width="560" height="315" src="http://www.mywebsite.com/todayinhistory.html" frameborder="0" allowfullscreen></iframe>',
            width     : 560 + 100,
            autoclose : 5000,
            icon      : 'clock'
         });
      },
   };
   $('a[href^="#fallr-"]').click(function(){
      var id = $(this).attr('href').substring(7);
      methods[id].apply(this,[this]);
      return false;
   });
});

現在はボタンクリックで動作していますが、ページが読み込まれたら起動できるかどうかを確認したいと思います。

4

1 に答える 1

0

これを試して:

$(document).ready(function(){

           var methods = {         

                autoclose : function(){
                    $.fallr('show', {
                        buttons     : {},
                        content     : '<p>This is a video</p><iframe width="560" height="315" src="http://www.mywebsite.com/todayinhistory.html" frameborder="0" allowfullscreen></iframe>',
                         width       : 560 + 100, 
                        autoclose   : 5000,
                        icon        : 'clock'
                    });
                }

            };
            $('a[href^="#fallr-"]').click(function(){
                var id = $(this).attr('href').substring(7);
                methods[id].apply(this,[this]);
                return false;
            });

       //autoload popup
       var autoLoadFallr =methods;
        autoLoadFallr.autoclose();
    });
于 2012-06-19T00:30:12.810 に答える