2
By default, I have a configuration file of various plugins and actions of my system
A simple example is the use of tooltip:
$(".bn-tooltip").tooltip({
track: true
});
Datepicker:
$('.bn-datepicker').datepicker({
autoclose: true,
});
I do this because when I will use anywhere in the system, I just call the class I have set there.
Well, it turns out that when I press I see ajax
my modals, it does not recognize these "settings" and I have to pass inside the modal page the same codes I already have, or put the file config.js
in modal
...
Is there any elegant solution to not need to insert every time you use modal the same codes or always insert the files script
?
I don’t quite understand, but it seems that the problem is you trying to apply the plugins to page elements before they exist. If so, no need to include scripts again, just initialize the plugins at the right time for each element.
– bfavaretto