Skip to content

Instantly share code, notes, and snippets.

@ziadoz ziadoz/example.js

forked from anonymous/example.js
Created Feb 23, 2012
What would you like to do?
JQuery Resize Events
// See:
(function($) {
$(document).ready(function() {
var resizeCallable = function() {
switch (true)
case (window.innerWidth <= 768):
// Do some exciting device size specific magic here.
var didResize = false;
$(window).on('load resize', function() {
didResize = true;
setInterval(function() {
if (didResize) {
didResize = false;
}, 250);

This comment has been minimized.

Copy link
Owner Author

ziadoz commented Nov 1, 2012

This is probably easier to achieve using Underscore JS:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.