Документация
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
на русском v1.2.5 Документацитя по MooTools 1.4.5 Обсуждение Установить себе Благодарности
Provides methods for the dynamic loading and management of JavaScript, CSS, and image files.
Injects a script tag into the head section of the document, pointing to the src specified.
var myScript = Asset.javascript(source[, properties]);
var myScript = new Asset.javascript('/scripts/myScript.js', {id: 'myScript'});
Injects a css file in the page.
var myCSS = new Asset.css(source[, properties]);
var myCSS = new Asset.css('/css/myStyle.css', {id: 'myStyle', title: 'myStyle'});
Preloads an image and returns the img element.
var myImage = new Asset.image(source[, properties]);
var myImage = new Asset.image('/images/myImage.png', {id: 'myImage', title: 'myImage', onload: myFunction});
Preloads an array of images (as strings) and returns an array of img elements. does not inject them to the page.
var myImages = new Asset.images(source[, options]);
onComplete()
onProgress(counter, index)
var myImages = new Asset.images(['/images/myImage.png', '/images/myImage2.gif'], { onComplete: function(){ alert('All images loaded!'); } });
© Linux.ria.ua, 2008-2024 |