冲突引导程序,原型Js和Jquery [英] Conflict Bootstrap, Prototype Js and Jquery

查看:95
本文介绍了冲突引导程序,原型Js和Jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过7天的搜索,并且尝试了不同的解决方案后,它没有用,我想问一下: 我有一个页面,其中包含原型js,protaplasm,scriptaculous,jquery和Jquery-ui,并且它与jquery完美协作,没有冲突,直到我最近使用Bootstrap下载了一个设计,然后出现了问题.原型js功能不再起作用.原型js的ajax更新和脚本般的inplaceeditor不再起作用. 我已经尝试了大多数解决方法,但是并没有真正得到结果.有人有可行的解决方案吗?

After 7 days of search and after i have tried different solutions and it did not work i would like to ask: I have a page with prototype js, protaplasm, and scriptaculous and jquery and Jquery-ui and it was working perfectly with the jquery no conflict until i recently downloaded a design with Bootstrap and here comes the trouble. Prototype js fonctionalities are no more working. The ajax update of prototype js and the inplaceeditor the scriptaculous are no more working. I have tried most work around but i did not really get the result. Does someone have a working solution ?

推荐答案

我找到了答案.为了避免Jquery,Prototype js,protoplasm,twitter引导程序之间发生冲突 拳头我在jquery之后添加了jquery noconlict

I have found the answer. To avoid conflict between Jquery, Prototype js, protoplasm, twitter bootstrap Fist i added the jquery noconlict after jquery

<script type="text/javascript">

    $.noConflict();

    </script>

然后我将每个jQuery代码放在

and i put every jquery code between

 jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.


///////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////

});

最重要的是,我打开了其他所有使用jquery的js文件(例如bootstrap.min.js),并在

And most importantly i opened every other js file that uses jquery like bootstrap.min.js and i copied and pasted the code inside between

 jQuery( document ).ready(function( $ ) {
    // Code that uses jQuery's $ can follow here.


    ///////////////////////////////////////////////////////////////////////////////


    ///////////////////////////////////////////////////////////////////////////////

    });

我仍然有一个类似TypeError的错误:this.element是带有Firebug的null controls.js,但一切运行正常

I still have an error like TypeError: this.element is null controls.js with Firebug but everything works perfectly

这篇关于冲突引导程序,原型Js和Jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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