in one go, which is faster than multiple append operations $(thumbsup_stylesheets.join('\n')).appendTo('head'); // After the stylesheets have been added, it is time to load the javascript template files. // First we set the cache option to true, otherwise getScript() will always prevent caching // by appending ?_=timestamp to the URLs of the loaded files. $.ajaxSetup({ cache: true }); // Loop over all the template names again for (i = 0; i < thumbsup_templates.length; i++) { // Load (via AJAX) and execute each template's javascript file $.getScript('/thumbsup/templates/'+thumbsup_templates[i]+'/jquery.js.php'); } // Turn off caching again, which is the default behavior $.ajaxSetup({ cache: false }); }); })(jQuery);
![]() |
© 2017 Syktuo.ru - Информационная справочно-поисковая система по медицине. При копировании материалов указание прямой гиперссылки на syktuo.ru обязательно. |
|