Created
April 16, 2014 19:07
-
-
Save jaredatch/10921549 to your computer and use it in GitHub Desktop.
Fancybox with small devices
This file contains 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
jQuery(document).ready(function($){ | |
// Small device? | |
var small_device = false; | |
if(window.innerWidth < 500 || window.innerHeight < 500 || window.outerWidth < 500 || window.outerHeight < 500) { | |
small_device = true; | |
} | |
// Fancybox | |
if(small_device == true) { | |
$('.login-modal a').attr("href", "http://www.domain.com/login"); | |
$('.get-started').attr("href", "http://www.domain.com/create"); | |
} else { | |
$('.modal, .login-modal > a').fancybox({ | |
padding: [ 70, 35, 35, 35 ], | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment