Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- $( '.site-header, .loadinggif' ).hide();
- var clicked = false;
- $(function() {
- $( '.site-header' ).after(
- '<img id="banner" style="width:100%; margin-top:-240px; position:relative" src="https://i.imgflip.com/kpvez.jpg"></img>',
- '<button id="continuebutton" style="z-index:10; position:absolute; margin-left:48%; margin-top:-50%">Continue</button>'
- );
- $( '#continuebutton' ).on( 'click', function() {
- $( '.site-header' ).slideDown( 1000 );
- $( '.entry-content' ).animatescroll({ 'scrollSpeed': 1500, 'padding': -5 });
- });
- });
- $(window).on( 'scroll', function() {
- $( '.site-header' ).slideDown( 1000 );
- var height = $( '#banner' ).height() - 40;
- if ( clicked && $(window).scrollTop() < height ) {
- $( '.entry-content' ).animatescroll({ 'scrollSpeed': 0, 'padding': 0 });
- }
- if ( $(window).scrollTop() > height ) {
- clicked = true;
- }
- });
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement