Using Google JSAPI breaks my infieldlabel javascri

2019-09-08 15:16发布

I currently have a site that both needs JSAPI and infieldlabels javascript. I have the following code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.infieldlabel.min.js"></script> 

<? /* those three lines for my menu */ ?>
<script type="text/javascript" src="http://www.google.com/jsapi" ></script>   
<script type="text/javascript" > google.load("mootools", "1.2.1"); </script> 
<script type="text/javascript" src="/js/MenuMatic_0.68.3.js"></script> 

<? /* INIT */ ?>
<script type="text/javascript">
    $(document).ready(function(){
        $("label").inFieldLabels();
    });
</script>

However, the infield labels do not work. IF I remove the line with Google JSAPI, infield labels start working, but my menu breaks.

How do I make both work?

1条回答
混吃等死
2楼-- · 2019-09-08 15:48

There was some conflict, so I used the var $j = jQuery.noConflict(); described here: http://docs.jquery.com/Using_jQuery_with_Other_Libraries

查看更多
登录 后发表回答