hi guys this code was working on jquery 1.4.4 well
$(function(){
$("head").append("<script src='jscript/helpdesk/core/classes/members.js' type='text/javascript'></script>");
var chkMember = $.validate_memberid();
});
but in jquery 1.5 this does'nt work . i think in 1.4.4 code was waiting for append or know append .js file but 1.5 run codes before script loaded :S any one know what to do ?
i don't want to use :
$.getScript('jscript/helpdesk/core/classes/members.js', function () {
// do st开发者_运维知识库uffs
});
cause i load many js files and unload them with append and remove :(
You should check out requireJS http://requirejs.org/
Sounds like you might have a lot dependent scripts, this will help you manage those.
精彩评论