The JQuery code:
if ($(window).width() < 1000) {
alert("width is less than 1000");
}
Only returns the window width value when the page is loaded. If the user's window started out being greater than 1000 and the shrunk the window width so that it was lower than 1000, the above code would not run. How do I get a constant check for the width of the window to account for this scenario.