jQuery Mobile iScrollView error



我使用jQuery Mobile和iScrollview在一起,我使用了iscrollView

滚动效果良好。

问题1:

当我单击输入文本/密码字段时,我得到一个与整个元素重叠的额外框,它具有与输入相同的内容。在 中发现同样的问题

here no solution

问题2:

当导航到下一页时,前一页仍然在新页面后面,当点击移动屏幕时,前一页从设备中消失。这不会发生在浏览器中。任何建议,

main.js代码

 require.config({
    paths: {
        jquery: '../lib/jquery',
        'jquery.mobile-config': 'helper/jqm-config',
        'jquery.mobile': '../lib/jquery.mobile-1.2.1.min',
        underscore: '../lib/underscore-min',
        backbone: '../lib/backbone-min',
        templates: '../templates',
        text: 'helper/text',
        config: 'helper/config',
        'backbone.subroute': '../lib/backbone.subroute',
        'cookie': '../lib/jquery.cookie',
         'maskInput': '../lib/Jquerymaskinput',
        'iscroll': '../lib/iscroll',
        'iscrollview': '../lib/jquery.mobile.iscrollview',
            }
    ,
    shim: {
        'underscore': {
            exports: "_"
        },
        'backbone': {
            //These script dependencies should be loaded before loading
            //backbone.js
            deps: ['jquery', 'underscore'],
            //Once loaded, use the global 'Backbone' as the
            //module value.
            exports: 'Backbone'
        },
        'jquery.mobile-config': ['jquery'],
        'jquery.mobile': ['jquery', 'jquery.mobile-config'],
        'backbone.subroute': ['jquery', 'underscore', 'backbone'],
        //'backbone.oauth':['jquery','underscore','backbone'],
        'iscroll': {
            deps: ['jquery.mobile']
        },
        'iscrollview': {
            deps: ['iscroll']
        },
        'config': {
            exports: 'Config'
        }
    }
});
requirejs(['jquery', 'iscroll', 'jquery.mobile', 'iscrollview'], function($, iScroll) {
    var elements = jQuery(document).find(":jqmData(iscroll)");
    elements.iscrollview();
    
});
require([
    'app'
], function(App) {
    App.initialize();
});
为路由器

define([
    'jquery',
    'underscore',
    'backbone',
    'backbone.subroute'
], function($, _, Backbone) {
    var AppRouter = Backbone.Router.extend({
        routes: {
            // general routes 
            '': 'defaultAction',
            'login':'login',               
            'menu': 'mainMenu',        
           
            // Default
            '*actions': 'defaultAction'       
        }
    });
  
    var initialize = function() {
            $('.back').live('click', function(event) {
                event.preventDefault();
                window.history.back();
                return false;
            });
        var app_router = new AppRouter;       
        app_router.on('route:defaultAction', function(actions) {
            require(['views/home/register'], function(RegisterView) {
                // We have no matching route, lets display the home page 
                console.log('At defaultAction');
            var registerView = new RegisterView();
            registerView.render();
               /// this.changePage(loginView, 'slide');
            });
        });          
         app_router.on('route:login', function(actions) {
            require(['views/home/login'], function(LoginView) {
                // We have no matching route, lets display the home page 
                console.log('At defaultAction');
            var loginView = new LoginView();
            loginView.render();
               /// this.changePage(loginView, 'slide');
            });
        });
        app_router.on('route:mainMenu', function(actions) {
            require(['views/home/menu'], function(MainMenuView) {
                console.log('At mainMenu::router');
            var mainMenuView = new MainMenuView();
            mainMenuView.render();
              //  this.changePage(mainMenuView, 'slide');
    });
        });
        Backbone.history.start();
    };
    return {
        initialize: initialize
    };
});

我重写了代码,但是,它或多或少解决了我的问题,将jqm更新到1.3,将jquery更新到1.9。重写所有CSS文件。导航到下一页很好至少它现在工作了。

感谢奥马尔帮助了我。

谢谢你我的朋友

相关内容

  • 没有找到相关文章

最新更新