How can we resolve the conflict between prototype and jQuery?

To resolve the conflict between jQuery and the prototype,
is there any way other than jQuery request to resolve through

jQuery.noConflict

and using jQueryinstead $('code').code;

Could we ask the prototype $to leave and allow.

+3
source share
3 answers

PrototypeJS JavaScript, jQuery. , : Ajax, $, $$, $F, Abstract, Form, $A, $H, $R, $w. api.prototypejs.org.

, : jQuery.noConflict() PrototypeJS.

0

, jQuery $ :

jQuery.noConflict();

jQuery(function ($) {
    // $ is the jQuery object in here
    // and doesn't conflict with Prototype
});

.

, " ", .

+8

- http://api.prototypejs.org/, $, noConflict() jQuery.

I wonder what function do you need for you to still use the prototype? There may be plugins for jQuery for this function. Using 2 libraries on one page will make your page bloated by the size of each library.

0
source

Source: https://habr.com/ru/post/1731141/


All Articles