Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

JQM 1.5 does not finish loading with RequireJS #8603

Open
byamla opened this issue Dec 6, 2017 · 1 comment
Open

JQM 1.5 does not finish loading with RequireJS #8603

byamla opened this issue Dec 6, 2017 · 1 comment

Comments

@byamla
Copy link

byamla commented Dec 6, 2017

When using jQuery Mobile 1.5 in conjunction with RequireJS, none of the define() calls except for the very first ever resolve, so the $.mobile namespace and others are never populated. This seems to be the case with files generated by the download builder and built locally with Grunt.

I couldn't figure out a JSBin example since it doesn't seem to serve up the latest 1.5, but my test page using RequireJS and files built locally looks like this:

<html>
  <head>
    <script src="require.js"></script>
    <script>
      require.config({
        paths: {
          'jquery': 'jquery-3.2.0',
          'jquerymobile': 'jquery.mobile'
        }
      });
      require(['jquery'], function ($) {
       console.log('required jquery, version ' + $().jquery);
        require(['jquerymobile'], function (jqm) {
          console.log(typeof $.mobile); //undefined
          console.log(typeof jqm); //undefined
        });
      });
    </script>
  </head>
</html>

The example page from http://demos.jquerymobile.com/1.5.0-alpha.1/backbone-requirejs/ is also failing to load anything: http://demos.jquerymobile.com/1.5.0-alpha.1/backbone-requirejs/backbone-require.html

@pistolero38
Copy link

Same issue...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants