Categories: jQuery

【jQuery】ページが読み込まれた瞬間にFancyboxを呼び出す

最近Fancyboxネタがおおい今日この頃ですが、
今回もまたFancyboxネタです。
すいません。
今回はページが読み込まれた瞬間にFancyboxを呼び出す方法の備忘録。
詳細は↓へ


読み込まれた瞬間にFancyboxを呼び出す。。。
その方法とはっ!!
まぁ答えは以下にいろいろ書いてあります。
How to launch jQuery Fancybox on page load?
僕がとった方法はこんなかんじで使いました。

$( function() {
$.fancybox({
hideOnContentClick:true,
overlayShow:true,
type:'iframe',
width:660,
height:200,
href:'読み込むページアドレス',
}).click();
});

こんだけでページがロードすると同時に自動的にFancyboxが開きます。
簡単あるねー。

mogmet

View Comments

  • Reading your article helped me a lot and I agree with you. But I still have some doubts, can you clarify for me? I'll keep an eye out for your answers.

  • Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  • Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  • Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.

Share
Published by
mogmet