How can I stop js script from running on mobile? I need some help with a Zen subtheme using responsive-sidebars.css
I have some javascript that I only want to run if the screen is bigger than 480px.
The javascript is:

(function ($) {
        jQuery(document).ready(function(){
         $('#selllink').trigger("click");
       });
    })


I am not sure how I would restrict this.
Many Thanks
Julie
You can deetect the screen size in Vanilla JS or jQuery. In jQuery you can use height() and width() to get screen size. So you can try this

jQuery(document).ready(function(){
  if($(window).width() &gt; 480){
    $('#selllink').trigger("click");
  }
});


You could also use resize() to check for window resize event.