Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($) {
- // Store the window width
- var windowWidth = $(window).width();
- // Resize Event
- $(window).resize(function(){
- // Check window width has actually changed and it's not just iOS triggering a resize event on scroll
- if ($(window).width() != windowWidth) {
- // Update the window width for next time
- windowWidth = $(window).width();
- // Do stuff here
- }
- // Otherwise do nothing
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement