Last active
March 13, 2016 12:06
-
-
Save ingozoell/eb5316e1f27b07a6c3fd to your computer and use it in GitHub Desktop.
Resize Modernizr Media queries detection
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
/* http://jsperf.com/bind-to-ready-and-resize/2 */ | |
$(document).ready(function() { | |
$(function mq_detection() { | |
$(window).resize(function() { | |
if(Modernizr.mq('only screen and (max-width:600px)')) { | |
} else { | |
} | |
}).trigger("resize"); /* Trigger resize handlers */ | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment