I am using fancyapps.com‘s FancyBox and I was wondering how to call a fancybox.ajax when the page loads.
Here is what I have:
$(document).ready(function(){
$("#what").fancybox();
});
<a href="what.html" id="what" class="fancybox fancybox.ajax"></a>
call the method on document ready
HTML
and script is
http://api.jquery.com/ready/
document.readyspecify a function to execute when the DOM is fully loaded.