Some time we need to show an message in popup when someone enters in our website.Its easy to call fancybox on page load

when we use fancy box

make sure you have included fancybox core files and jQuery

Here is the code to do so

$(document).ready(function(){
 
    var popup= $('#popup');
 
    $.fancybox(popup);
 
})

And the popup html element as follows

<div id="popup" style="display:none;"><h2>Sample Content</h2></div>

This will help you to call fancybox on page load

Leave a Reply

Your email address will not be published. Required fields are marked *