Hi Rashida
Exactly I am creating an addon (I have created several without javascript).
I am not trying to insert custom javascript to use in some addon.
What I am doing is integrating swiper.js into the code of an addon with the following functions inside site.php
public function render() {
// here code for create html
}
public function stylesheets () {
// here code for load css files
}
public function scripts() {
// here code for load swiper.js
}
public function js() {
// here code for initialize swiper
$js = 'var swiper = new Swiper (".mySwiper", {});';
return $js;
}
I'm NOT using the live editor function public function getTemplate()
This works fine in the public part, but not in the live editor and I don't understand why. I am using javascript not jQuery.
If you could give me a reason why it does not run in the editor, I would be eternally grateful.