让jQuery mobile scrollview也在桌面上工作?

让jQuery mobile scrollview也在桌面上工作?,jquery,internet-explorer,mobile,scrollview,Jquery,Internet Explorer,Mobile,Scrollview,我目前有一个在桌面浏览器和平板电脑上工作的web应用程序。除了jquery mobile scrollview之外,我已经完成了所有工作,并收听了正确的事件类型 我使用这个插件作为底部的导航栏。它适用于除internet explorer以外的所有浏览器。有人知道要在文件中更改什么才能让它在ie上工作吗 我还发现了插件iScroll,但这一个没有提供相同的功能。如果可能的话,我宁愿继续使用jquery mobile scrollview。很可能它在IE上无法正常工作。jQuery mobile非

我目前有一个在桌面浏览器和平板电脑上工作的web应用程序。除了jquery mobile scrollview之外,我已经完成了所有工作,并收听了正确的事件类型

我使用这个插件作为底部的导航栏。它适用于除internet explorer以外的所有浏览器。有人知道要在文件中更改什么才能让它在ie上工作吗


我还发现了插件iScroll,但这一个没有提供相同的功能。如果可能的话,我宁愿继续使用jquery mobile scrollview。

很可能它在IE上无法正常工作。jQuery mobile非常基于HTML5,即不太符合HTML5

最好的办法是调查并让谷歌解决IE中缺乏HTML5支持的问题。它的实现非常简单,网站上有模板,它也应该加快网站上其他JavaScript的速度


希望有帮助

为了让jquery mobile scrollview与IE协同工作,将jquery.mobile.scrollview.js第22行修改为:>scrollMethod:“scroll”、//“translate”、“position”、“scroll”这是IE不支持的默认翻译设置。

而不是编辑jquery.mobile.scrollview.js,创建对象时,可以通过首先检查浏览器是否为IE来设置选项:

if($.browser.msie){
   opts.scrollMethod = "scroll";
}
在页面创建功能中使用此选项

var $page = $( this );

// For the demos that use this script, we want the content area of each
// page to be scrollable in the 'y' direction.

//$page.find( ".ui-content" ).attr( "data-" + $.mobile.ns + "scroll", "y" );

// This code that looks for [data-scroll] will eventually be folded
// into the jqm page processing code when scrollview support is "official"
// instead of "experimental".

$page.find( ":jqmData(scroll):not(.ui-scrollview-clip)" ).each(function () {
    var $this = $( this );
    // XXX: Remove this check for ui-scrolllistview once we've
    //      integrated list divider support into the main scrollview class.
    if ( $this.hasClass( "ui-scrolllistview" ) ) {
        $this.scrolllistview();
        scrollViewObj = $this;
    } else {
        var st = $this.jqmData( "scroll" ) + "",
            paging = st && st.search(/^[xy]p$/) != -1,
            dir = st && st.search(/^[xy]/) != -1 ? st.charAt(0) : null,

            opts = {
                direction: dir || undefined,
                paging: paging || undefined,
                scrollMethod: $this.jqmData("scroll-method") || undefined
            };


        if($.browser.msie){
            opts.scrollMethod = "scroll";
        }
        $this.scrollview( opts );
        scrollViewObj = $this;
    }

});

谢谢你的快速回答。这是一件有趣的事情,谷歌Chrome框架。如果这是我们唯一没有为我们的客户提供的功能,我们就不得不安装谷歌Chrome框架,那么我宁愿不实现它。我将与管理层开会,看看他们对你的解决方案有何看法。也许我们可以用它来解决这个问题。谢谢