Responsive Bootstrap Toolkit provides an easy way of breakpoint detection in JavaScript, detecting changes in currently active breakpoint, as well as executing any breakpoint-specific JavaScript code.
Current version: 1.5.0
if (BS.isBreakpoint('xs')) {
// do stuff in the lowest resolutions only!
}
if (BS.isBreakpoint('lg')) {
// do stuff on huge screens only
}
$( w ).bind('resize', function() {
BS.waitForFinalEvent(function() {
// do some other stuff!
}, 300, BS.timeString.getTime())
});