Injecting data into jQuery $.getScript call -


i need inject data $.getscript call, it'll availabe in ready handler, how do that?

// since it's called in loop need pass context read handler $.getscript(path, function (e2) {  }; 

in regular event handlers can do passing data second parameter , e.data.* within event handler:

element.on("event", { extra: "data" }, function(e) { console.log(e.data.extra); }); 

which doesn't seem work $.getscript.

the .getscript() not provide functionality, think can make use of closure here

ex:

for(var = 0; < x; i++){     (function(idx){         $.getscript(path, function (e2) {             console.log(idx);         });     })(i); } 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -