My goal is to remove 2 sections if someone resizes a window to less than 647px and re-add them if they resize to at least 647px. The code I have to remove the sections has worked great, but adding them again is not going so well. I cannot do this with a media query because of a plugin I'm using. Here is what I have so far:
// CHECKS WINDOW SIZE AND ADDS/REMOVES MUSIC & PHOTOS
var $window = $(window);
var $pane = $('#pane1');
function checkWidth() {
var windowsize = $window.width();
if (windowsize < 647) {
//if the window is greater than 647px wide then turn on jScrollPane..