Custom javascript file not working in mobile browsers I have added a custom jQuery file to my theme with the theme.libraries.yml. In my laptop and fullscreen browsers the added javascript is working without any issues. But it seems the javascript does not have any effect in mobile browsers(I'm testing with ipad and iphone browsers in both safari and chrome). My custom_theme_libraries.yml is as following

global-scripts:
  js:
  js/jqueryfile1.js: {}
dependencies:
- core/jquery


And my jqueryfile1.js is as following

(function ($){
Drupal.behaviors.myModuleBehavior = {
    attach: function(context, settings) {
        $(document).ready(function(){

            //code goes here

            });
        });
    }
};
})(jQuery);


Is there any additional configurations to be considered to get the code works in mobile browser also?
It seems like your code is the problem. You have extra });

Should be

(function ($) {
  Drupal.behaviors.myModuleBehavior = {
    attach: function(context, settings) {
      $(document).ready(function() {
        // code goes here
      });
    }
  };
})(jQuery);


But it is nonsense to use $(document).ready as it is already handled by Drupal.behaviors.

So the proper way is.

(function ($) {
  Drupal.behaviors.myModuleBehavior = {
    attach: function(context, settings) {
      // code goes here
    }
  };
})(jQuery);


The attach() method is called when the DOM has loaded both initially and after any AJAX calls. 

See this doc for more info. https://www.drupal.org/docs/8/api/javascript-api/javascript-api-overview