i’m very new to jquery, please help me in makeing a for loop or something through which i can minimize the amount of code written below :
$.getScript(basejq + 'ui/jquery.ui.core.js', function(){
$.getScript(basejq + 'ui/jquery.ui.widget.js', function(){
$.getScript(basejq + 'ui/jquery.ui.mouse.js', function(){
$.getScript(basejq + 'ui/jquery.ui.slider.js', function(){
$.getScript(basejq + 'time.js', function(){
$('.timepicker').jtimepicker();
});
$('*').remove(':time');
});
});
});
});
I have no idea, i will appreciate any of your help, thanks in advance.
Here is a cleaner solution but you could go further with this. I am assuming that each one of those scripts is dependent on the previous script.
Also, there are a few libraries that can handle javascript dependencies for you. You may want to look into that.