0

我想为我的软件支持主流流行浏览器,我需要支持谷歌浏览器,我的代码如下

$(document).ready(function(){ 
    $('#Menu').sweetMenu({
        top: 120,
        padding: 8,
        iconSize: 48,
        easing: 'easeOutBounce',
        duration: 500,
        icons: [
            '<?php echo base_url()?>img/template/home.png',
            '<?php echo base_url()?>img/template/logout.png',
        ]
    });
});  

当我使用上面的代码并且使用在下面时

 <script type="text/javascript" src="<?php echo base_url()?>js/jquery-1.4.2.min.js"></script>

然后 Sliding Manu 在所有主流浏览器中都可以使用,但 Autocomplete 在这里不起作用

当我使用下面的代码而不是 jquery-1.4.2.min.js

<script type="text/javascript" src="<?php echo base_url()?>js/jquery-1.8.3.js"></script>

然后它可以在没有谷歌浏览器的所有主要浏览器中使用,如果我同时使用这两个代码,那么这是同样的问题

我怎样才能完美解决它,请帮助我

4

1 回答 1

0

I dont think you will solve this easily. The menu plugin you are using is no longer in development (not built with latest jquery in mind), I cant find any info about what browsers it is supposed to work on, and quite frankly it doesn't look that hard to replicate

Your options look like this to me.

1) Spend time trying to work out what the bug is in chrome and fix it (I'm sorry I can't be more help with this).

2) Put together a similar effect in a few lines of your own jquery.

3) Use one of the thousands of similar plugins that do work in all major browsers

4) Look for autocomplete that works with jquery 1.4.2

5) Load both versions of jquery as suggested in comments (I hate this approach - jquery is enough of an overhead without loading it twice)

于 2013-01-07T14:52:26.967 回答