Created
September 14, 2016 08:45
-
-
Save asilbalaban/3df710789f16981fb935489f30ea5d6b to your computer and use it in GitHub Desktop.
bootstrap responsive breakpoints detector
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
function responsive () | |
{ | |
if ($(window).width() < 768) { | |
console.log('xs'); | |
} | |
else if ($(window).width() >= 768 && $(window).width() <= 992) { | |
console.log('sm'); | |
} | |
else if ($(window).width() > 992 && $(window).width() <= 1200) { | |
console.log('md'); | |
} | |
else { | |
console.log('lg'); | |
} | |
} | |
responsive(); | |
$(window).on('resize', responsive); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment