L
L
lagudal2020-11-18 15:08:23
JavaScript
lagudal, 2020-11-18 15:08:23

$.fn.modal.noConflict is not a function - how to fix?

Given: a webshop on Magento 2, there is a link/links on click on each page that opens a modal window.
On some pages, it is not yet clear why, the modal windows did not open, the error in the console was as follows:

Uncaught TypeError: f[b] is not a function

Here the solution to the problem is suggested - add the noConflict method.

$.fn.bsModal = $.fn.modal.noConflict();

After that, modal windows magically work without problems on the problem pages, but another error appeared in the console:

Uncaught TypeError: $.fn.modal.noConflict is not a function


And although this error does not affect functionality, I want to figure out why it does?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question