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 use it anywhere on the system, I just call the class I have set there.
Well, it happens that when I load via ajax
my modals, it does not recognize these "configurations" and I have to pass within the modal page the same codes I already have, or put the file config.js
in modal
...
Is there any elegant solution to not have to insert all the time you will use the same codes or always insert the script
files?