简体   繁体   English

冲突引导、原型 Js 和 Jquery

[英]Conflict Bootstrap, Prototype Js and Jquery

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.经过 7 天的搜索,在我尝试了不同的解决方案但没有奏效之后,我想问:我有一个带有原型 js、protaplasm、scriptaculous、jquery 和 Jquery-ui 的页面,它与 jquery 完美配合,没有冲突,直到我最近用 Bootstrap 下载了一个设计,麻烦来了。 Prototype js fonctionalities are no more working.原型 js 功能不再有效。 The ajax update of prototype js and the inplaceeditor the scriptaculous are no more working.原型js 的ajax 更新和scriptaculous 的inplaceeditor 不再起作用。 I have tried most work around but i did not really get the result.我已经尝试了大多数工作,但我并没有真正得到结果。 Does someone have a working solution ?有人有可行的解决方案吗?

I have found the answer.我找到了答案。 To avoid conflict between Jquery, Prototype js, protoplasm, twitter bootstrap First i added the jquery noconlict after jquery为了避免 Jquery、Prototype js、protoplasm、twitter bootstrap 之间的冲突首先我在 jquery 之后添加了 jquery noconlict

<script type="text/javascript">

    $.noConflict();

    </script>

and i put every jquery code between我把每个 jquery 代码放在

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


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


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

});

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 的 js 文件,例如 bootstrap.min.js,然后将代码复制并粘贴到它们之间

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


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


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

    });

I still have an error like TypeError: this.element is null controls.js with Firebug but everything works perfectly我仍然有类似 TypeError 的错误:this.element is null control.js with Firebug 但一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM