Created
December 14, 2016 10:29
-
-
Save sealucky7/d23683875a5110241f2a47ed6bcf024e to your computer and use it in GitHub Desktop.
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
var win = $(window); | |
function windowSize(){ | |
if ($(window).width() <= '600' && win.scrollTop() > 600){ | |
$('.order-mobile').fadeIn('slow'); | |
} else { | |
$('.order-mobile').fadeOut('slow'); | |
} | |
} | |
$(window).load(windowSize()); // при загрузке | |
$(window).resize(windowSize()); // при изменении размеров | |
// или "два-в-одном", вместо двух последних строк: | |
$(window).on('load resize',windowSize()); | |
windowSize(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment