Ticket #9320 (closed enhancement: wontfix)
Load multiple scripts with $.getScript
| Reported by: | gimi.alb@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | ajax | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hi,
I would like to request a feature if possible.
I would like a way to load multiple scripts at once and fire 1 single function when all the scritps have been loaded. Right for example:
$.getScript('js/script.js',function(){
execute function
});
takes a string as url and loads only one script. would it be possible to have the function also take an array of strings as an argument e.g:
$.getScript(['js/script.js','js/script1.js','js/script2.js'],function(){
execute function
});
and execute only one function when all the scripts have been loaded.
Thank you
Change History
comment:1 Changed 2 years ago by rwaldron
- Priority changed from undecided to low
- Resolution set to wontfix
- Status changed from new to closed
- Component changed from unfiled to ajax
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Feature request filled:
https://gist.github.com/977792
demo:
http://jsfiddle.net/rwaldron/jgjHy/
;)