Created
February 13, 2016 22:34
-
-
Save celticwebdesign/9621b69aa67a7b6a1212 to your computer and use it in GitHub Desktop.
Fancybox open on page load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JS ---- | |
(function ($, root, undefined) { | |
$(function () { | |
if ($('body.home').length > 0 ) { | |
$.fancybox({ | |
'width': '100%', | |
'height': '100%', | |
'autoScale': true, | |
'transitionIn': 'fade', | |
'type': 'inline', | |
'href': '#popup' | |
}); | |
} | |
}); | |
})(jQuery, this); | |
CSS ---- | |
// Competition Valentines 2016 | |
// if( $('body.valentines-day-win-a-bottle-of-bubby-and-a-50-voucher').length > 0 ) { | |
// var type = window.location.hash.substr(1); | |
// if( type == "competition" ) { | |
// $('html, body').animate({ | |
// scrollTop: $("#mc_embed_signup").offset().top | |
// }, 2000); | |
// } | |
// } | |
Used for scrolling the page on load. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment