I have an if statement on my website which does commands when the page is under a certain size. there is one small problem. if the page size is over 1000 it automatically says the if statement is not true and goes to the else. my attempts are bellow
if($("body").css("width") < 700 + "px")
You are comparing strings. Strip off the trailing "px" from the left value (How to delete "px" from 245px) and compare numbers.
if(parseInt($("body").css("width") , 10) < 700)