jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.68k stars 2.4k forks source link

tap event not working #8660

Closed LingboCN closed 4 years ago

LingboCN commented 4 years ago

I use requireJS , JQ3.4.1 and JQ Mobile 1.5.0-alpha my code like this.

require.config({
  paths: {
    jquery: '/jquery',
    'jquery.mobile': '/jquery.mobile-1.5.0-alpha.min',
    'jquery.mobile-config': '/jquery.mobile-config',
  },
  shim: {
    'jquery.mobile-config': ['jquery'],
    'jquery.mobile': ['jquery', 'jquery.mobile-config']
  }
})

require(['jquery', 'jquery.mobile'...], function($, ...) {
...
$("body").bind("keyup", function(e) {
        if (e.which === 13) {
            $("#login").tap();
        }
});
$("#login").bind("tap", onLoginTap);
...
})

I didn't know why throw err '$(...).tap is not a function'

LingboCN commented 4 years ago

jqm not is not correctly referenced