If it's stupid but works, it isn't stupid.
Firing Responsive jQuery Functions based on CSS Media Queries Rather than Window Width
https://www.fourfront.us/blog/jquery-window-width-and-media-queries
$(window).width() not the same as media query
https://stackoverflow.com/questions/19291873/window-width-not-the-same-as-media-query
https://stackoverflow.com/questions/20181219/twitter-bootstrap-how-to-detect-when-media-queries-starts
https://www.fourfront.us/blog/jquery-window-width-and-media-queries
$(window).width() not the same as media query
https://stackoverflow.com/questions/19291873/window-width-not-the-same-as-media-query
https://stackoverflow.com/questions/20181219/twitter-bootstrap-how-to-detect-when-media-queries-starts