Is there a way to hide a div if the screen size exceeds 700px, and only show it when the screen size is less than 700px?
Below is the jQuery code I'm attempting to use:
jQuery(document).ready(function() {
if ((screen.width>701)) {
$(".mobile-section").css('display', 'none'); $(".yourClass").hide();
}elseif ((screen.width<=699)) {
$(".mobile-section").css('display', 'block');
}
});
I'm having trouble getting it to work - Am I missing something here?