Javascript-форум (https://javascript.ru/forum/)
-   Events/DOM/Window (https://javascript.ru/forum/events/)
-   -   yepnope - асинхронная загрузка CSS (https://javascript.ru/forum/events/46901-yepnope-asinkhronnaya-zagruzka-css.html)

Sacred13 28.04.2014 22:04

yepnope - асинхронная загрузка CSS
 
Люди добрые!!! Подскажите как правильно подключить yepnope для асинхронной загрузки CSS - http://yepnopejs.com

Делаю вот так, но стили не подгружается, в чем проблема?


<script async="" src="/js/modernizr-2.5.1-custom.min.js"></script>
<script>
yepnope([
{
load : [ '/hostcmsfiles/jquery/jquery.js',
'/hostcmsfiles/jquery/jquery.validate.js',
'/hostcmsfiles/main.js'
],
complete : function () {
jQuery(function ($) {
$('code').not('.stayugly').each(function () {
this.innerHTML = js_beautify( $.trim( $(this).html() ), {
indent_size: 2,
preserve_newlines: true,
space_after_anon_function: true
} );
yepnope.injectCss("/css/1024.css", function () {
console.log("css injected!");
}, {
media: "all"
}, 5000);
});
});
}
}

]);
</script>


Заранее всем спасибо


Часовой пояс GMT +3, время: 06:05.