I would like all actions programmed with JavaScript to go down when $(window).width() <= 800
to avoid conflicts between Mobile and desktop layout. But the truth is that it runs out of CSS but the actions (events) defined in JavaScript continue to happen and I would like it to stop everything, as if nothing was set in jQuery. I have the following code but it does not work:
HTML:
....
<link rel="stylesheet" media='screen and (min-width: 801px)' href ="css/styles.css">
<link rel="stylesheet" media='screen and (max-width: 800px)' href ="css/stylesMob.css">
<!-- HTML -->
....
//JQUERY
....
//isto no final da página
if ($(window).width() < 800) {
$('*').off();
}
$(window).resize(function(){
if ($(window).width() < 800) {
$('*').off();
}
})
For a more detailed view, here is the site.