modified: index.html
new file: js/art.js new file: js/hdr.js new file: js/hearts.js new file: js/helpers.js new file: js/particles.js new file: js/qlpycon.js new file: js/qlpyconbanner.js new file: js/snek.js new file: js/sparks.js new file: js/stars.js modified: slamp.html modified: style.css
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
$(function() {
|
||||
var body = $('#starshine'),
|
||||
template = $('.template.shine'),
|
||||
stars = 500,
|
||||
sparkle = 50;
|
||||
|
||||
var size = 'small';
|
||||
var createStar = function() {
|
||||
template.clone().removeAttr('id').css({
|
||||
top: (Math.random() * 100) + '%',
|
||||
left: (Math.random() * 100) + '%',
|
||||
webkitAnimationDelay: (Math.random() * sparkle) + 's',
|
||||
mozAnimationDelay: (Math.random() * sparkle) + 's'
|
||||
}).addClass(size).appendTo(body);
|
||||
};
|
||||
|
||||
for(var i = 0; i < stars; i++) {
|
||||
if(i % 2 === 0) {
|
||||
size = 'small';
|
||||
} else if(i % 3 === 0) {
|
||||
size = 'medium';
|
||||
} else {
|
||||
size = 'large';
|
||||
}
|
||||
|
||||
createStar();
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user