Android OS上的jQuery性能(三星galaxy Tab)

时间:2012-05-02 10:41:45

标签: jquery jquery-ui android samsung-mobile

我用jQuery UI做了一个简单的登陆页面。 当我在iphone / ipad /台式机上测试时效果很好,但在这款平板电脑上的工作速度确实很慢。 它有draggabile元素和滑块。 我试着下载Opera,它比其他浏览器的效果更好。 有人有想法吗?

谢谢, 莱昂内尔

代码示例:

$("#drop, #drop2, #drop3, #drop4").droppable({

    drop: function( event, ui ) {
        //$(ui.draggable).remove();
        //$(this).css({'border':'#777 dashed 3px','background':'#eee'});

        var currentId = $(ui.draggable).attr('id');
        var currentDrop = $(this).attr('id');
        if (currentDrop == "drop"){
            if(currentId == "multitouch"){
                /*
                functionFactory('routing_connect',{'chin':'1' , 'chout':'1'})
                */
            } else if(currentId == "source-2"){
                /*
                functionFactory('routing_connect',{'chin':'2' , 'chout':'1'})
                */
            } else if(currentId == "source3"){
                /*
                functionFactory('routing_connect',{'chin':'3' , 'chout':'1'})
                */
            } else if(currentId == "source-4"){
                /*
                functionFactory('routing_connect',{'chin':'4' , 'chout':'1'})
                */
            } else if(currentId == "source-5"){
                /*
                functionFactory('routing_connect',{'chin':'5' , 'chout':'1'})
                */
            } else if(currentId == "source-6"){
                /*
                functionFactory('routing_connect',{'chin':'6' , 'chout':'1'})
                */
            } else if(currentId == "source-7"){
                /*
                functionFactory('routing_connect',{'chin':'7' , 'chout':'1'})
                */
            } else if(currentId == "source-8"){
                /*
                functionFactory('routing_connect',{'chin':'8' , 'chout':'1'})
                */
            }
            $('#texto1').html(currentId);
        } else if (currentDrop == "drop2"){
            if(currentId == "multitouch"){
                /*
                functionFactory('routing_connect',{'chin':'1' , 'chout':'2'})
                */
            } else if(currentId == "source-2"){
                /*
                functionFactory('routing_connect',{'chin':'2' , 'chout':'2'})
                */
            } else if(currentId == "source-3"){
                /*
                functionFactory('routing_connect',{'chin':'3' , 'chout':'2'})
                */
            } else if(currentId == "source-4"){
                /*
                functionFactory('routing_connect',{'chin':'4' , 'chout':'2'})
                */
            } else if(currentId == "source-5"){
                /*
                functionFactory('routing_connect',{'chin':'5' , 'chout':'2'})
                */
            } else if(currentId == "source-6"){
                /*
                functionFactory('routing_connect',{'chin':'6' , 'chout':'2'})
                */
            } else if(currentId == "source-7"){
                /*
                functionFactory('routing_connect',{'chin':'7' , 'chout':'2'})
                */
            } else if(currentId == "source-8"){
                /*
                functionFactory('routing_connect',{'chin':'8' , 'chout':'2'})
                */
            } 
            if(currentId == "multitouch"){
                $('#texto2').html(currentId + "<br>" + '<p style="font-size:10px">only video source</p>' );
            } else {
                $('#texto2').html(currentId);
            }

        } else if (currentDrop == "drop3"){
            if(currentId == "multitouch"){
                /*
                functionFactory('routing_connect',{'chin':'1' , 'chout':'3'})
                */
            } else if(currentId == "source-2"){
                /*
                functionFactory('routing_connect',{'chin':'2' , 'chout':'3'})
                */
            } else if(currentId == "source-3"){
                /*
                functionFactory('routing_connect',{'chin':'3' , 'chout':'3'})
                */
            } else if(currentId == "source-4"){
                /*
                functionFactory('routing_connect',{'chin':'4' , 'chout':'3'})
                */
            } else if(currentId == "source-5"){
                /*
                functionFactory('routing_connect',{'chin':'5' , 'chout':'3'})
                */
            } else if(currentId == "source-6"){
                /*
                functionFactory('routing_connect',{'chin':'6' , 'chout':'3'})
                */
            } else if(currentId == "source-7"){
                /*
                functionFactory('routing_connect',{'chin':'7' , 'chout':'3'})
                */
            } else if(currentId == "source-8"){
                /*
                functionFactory('routing_connect',{'chin':'8' , 'chout':'3'})
                */
            } 
            if(currentId == "multitouch"){
                $('#texto3').html(currentId + "<br>" + '<span style="font-size:10px">only video source</span>' );

            } else {
                $('#texto3').html(currentId);
            }               

        } else if (currentDrop == "drop4"){
            $('#texto4').html(currentId);
        }
    },

0 个答案:

没有答案