Bug Tracker

Modify

Ticket #9320 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 8 months ago

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

comment:2 follow-up: ↓ 3 Changed 19 months ago by anonymous

Any explanation why this was closed. Is there some obvious better way of obtaining the desired effect.

comment:3 in reply to: ↑ 2 Changed 8 months ago by anonymous

Replying to anonymous:

Any explanation why this was closed. Is there some obvious better way of obtaining the desired effect.

I support this request. This is a function I would also like.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.