【问题标题】:Jquery mobile navigation issuejquery手机导航问题
【发布时间】:2012-06-18 08:51:46
【问题描述】:

我在 jquery 移动应用程序中使用 simpledialog。在正常浏览器宽度下运行时它工作正常。 但是,当我将屏幕宽度减小到小于 250 像素(apprx。)(屏幕宽度匹配移动设备)时,URL 开始在当前 URL 中附加 #&ui-state=dialog。问题也与重定向有关。我的一个按钮链接到其他页面。当我单击该按钮时,它会重定向到指定页面并返回当前页面。但如果我再次这样做,就不会有任何问题。谁能帮我解决这个问题?

我的简单对话框代码如下:

$('#create_invoice').append('<div id="temp_div_popup" style="width:80px;position:absolute;top:0px;left:0px;"></div>');
$('#temp_div_popup').simpledialog({
    'buttons':{
        'Edit':{
            click:function () {
                operation = 'edit_exist';
                if (type == 'item') {
                    $.mobile.changePage('add_item.html',{
                        transition : 'none',
                        allowSamePageTransition : true
                    });
                }
                else if (type == 'task') {
                    $.mobile.changePage('add_task.html',{
                        transition : 'none',
                        allowSamePageTransition : true
                    });
                }
                $('#temp_div_popup').remove();
            }
        },
        'Delete':{
            click:function () {
                deleteItemOrTask(type);
                $('#temp_div_popup').remove();
            }
        },

        'Cancel':{
            click:function () {
                $('#temp_div_popup').remove();
            },
            icon:"delete",
            theme:"c"
        }
    },
    'height' :function(){
        return '55px;'
    },
    'width' : function(){
        return '140px';
    }
});

【问题讨论】:

    标签: jquery jquery-mobile navigation


    【解决方案1】:

    此问题通常仅在较小的视图中出现,例如在手机中。可以通过将浏览器调整为更小的窗口来模拟它。我通过删除这个插件并添加我自己的自定义对话框窗口解决了这个问题。 :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-07
      • 2012-03-18
      • 2011-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多