/*
__ _ ___ ___ ___ ___ ___ ____ _ __ ___ ___
/ _` |/ / / __/ _ \ / _ \ / / / __/| '_ ` _ \ / /
| (_| |\ \| (_| (_) | (_) |\ \ | (__ | | | | | |\ \
\__,_|/__/ \___\___/ \___/ /__/ \___\|_| |_| |_|/__/
*/
(function($) {
/**
* Function: Load CSS
* To Use:
* jQuery.loadCSS("/my/style/file.css") or
* jQuery.loadCSS("/my/style/file.css", "screen");
*/
$.fn.loadCSS = function( url, media ) {
$(document.createElement('link') ).attr({
href: url,
media: media || 'screen',
type: 'text/css',
rel: 'stylesheet'
}).appendTo('head');
}
// .......
})(jQuery);
This jAscoos (jQuery Ascoos Library) function, dynamically reads a css file.
Can be used and outside of the Ascoos Cms
Can be used and outside of the Ascoos Cms
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.