E
E
eatmypants2015-08-08 17:59:11
JavaScript
eatmypants, 2015-08-08 17:59:11

How to change function in Javascript class prototype?

I am using bootstrap in my project and I need to change the behavior of the Modal class.
All functions and the class itself are declared in the bootstrap.js file, which is included after jQuery. After that, my script is also connected. In it after I try to change the behavior of the Modal class, but it says "Modal is not defined" to me.
How can I correctly change the prototype of this class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
artemdemo, 2015-08-08
@artemdemo

In my opinion, there are two options:
The problem is in the order of loading libraries - maybe one of the libraries is loaded asynchronously?
Either you are accessing the Modal variable incorrectly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question