ControlledChaos of Controlled Chaos Design
8/9/2016 - 6:58 PM

Open Fancybox on page load

Open Fancybox on page load

$(document).ready(function () {
  $.fancybox({
    'width': '80%',
    'height': '80%',
    'autoScale': true,
    'transitionIn': 'fade',
    'transitionOut': 'fade',
    'type': 'iframe',
    'href': 'http://www.example.com'
  });
});
// create a hidden link
$(document).ready(function () {
  $("#hidden_link").fancybox({
    'width': '80%',
    'height': '80%',
    'autoScale': true,
    'transitionIn': 'fade',
    'transitionOut': 'fade',
    'type': 'iframe'            
  });

$("#hidden_link").trigger('click');
});
// create a hidden link
$(document).ready(function() {
  $("#hidden_link").fancybox().trigger('click');
});

Open Fancybox on page load

Three options below.