避免在我的jsf应用程序中发生jquery冲突 [英] Avoid jquery conflict in my jsf application

查看:148
本文介绍了避免在我的jsf应用程序中发生jquery冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jsf项目中加载了jquery。我只加载标题部分。

I load jquery in my jsf project. I load header part only.

在加载jquery之前,链接和菜单操作都完美无缺。 (不加载jquery)

Before i load the jquery, link and menu actions are perfectly worked. (Not load jquery)

但是,在我加载jquery后,链接操作和菜单操作都无效。

But, after i load the jquery the link action and menu action are not worked.

我使用 jQuery.noConflict(); $ .noConflict(); 但没有更多改进。

i use jQuery.noConflict(); and $.noConflict(); But no more improvement.

实际上,当我加载jquery时,为什么会出现这个问题。

Actually, why this problem occur when i load the jquery.

 <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">              
    <a4j:loadScript src="../../scripts/jquery-1.3.2.min.js"/>          

     <script type="text/javascript">  
             jQuery.noConflict();                   
      </script>     

</head>

我还使用 jquery-1.4.2.min.js 。但不能正常工作我的菜单和链接动作。

And also i use jquery-1.4.2.min.js. But not work my menu and link action.

我为此付出了更多努力。

i希望,在这里我会得到一些解决方案。

帮助我。

感谢您宝贵的时间。

I put more effort for this.
i hope, here i will get some solution.
Help me.
Thanks for your valuable time.

推荐答案

我得到了答案。

   <head>  
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">      

    <a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js" />                 
    <a4j:loadScript src="../scripts/highcharts.js"/>  

    <script type="text/javascript">  

     jQuery.noConflict();  

     jQuery(document).ready(function()  
     {  
          ....  
          ....  
     });  

 </script>  </head> 

这篇关于避免在我的jsf应用程序中发生jquery冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆