Answer the question
In order to leave comments, you need to log in
How to make a JS function from View see a function that is in a script.js file?
I am using Yii2. dop.php
There is a JS script in the view :
(function handlerUrl() {
var url = window.location.href;
if(url.search( /faq/ )) {
.....................
accordion(anchorEl.parent());
}
})();
script.js
that I include at the end of the page, there is the code:$(function () {
function accordion(clickEl) {
...................
}
});
handlerUrl()
see the accordion?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question