I am making online product site, I am trigging a scroll event, at starting only 12 elements will be shown but when 8th element is scrolled to top scroll event should run onl
var thisHash = window.location.hash;
jQuery(document).ready(function() {
if(window.location.hash) {
jQuery.fancybox(thisHash, {
padding: 20
// more API options
});
}
});
This is even better, because you don't need the button to trigger fancybox. And with the previous code I wasn't able to insert a form inside fancybox, cause everytime I was clicking inside the form, it was relaunching fancybox.