Hearts effect for each CMS
Hey!
I've made a little thing for Valentine's Day.
It is an Hearts effect..
Add in the <head>:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
The JavaScript:
Code:
if(!window["bas"]){
window["bas"] = {};
}
if(!window["bas"]["snow"]){
window["bas"]["snow"] = {};
bas.snow.windowWidth = 100;
bas.snow.intervalTimeA = 500;
bas.snow.intervalTimeB = 200;
bas.snow.removeTime = 10000;
bas.snow.snowID = 0;
bas.snow.text = "❤";
bas.snow.init = function(){
bas.snow.doAdd();
window.setInterval("bas.snow.doAdd()",bas.snow.intervalTimeA);
window.setInterval("bas.snow.doAdd()",bas.snow.intervalTimeB);
};
bas.snow.doAdd = function(){
bas.snow.snowID = parseInt(bas.snow.snowID + 1);
var item = document.createElement("div");
item.id = "bas_snow_" + bas.snow.snowID;
item.innerHTML = bas.snow.text;
item.style.position = "fixed";
item.style.left = Math.floor(Math.random()*bas.snow.windowWidth) + "." + Math.floor(Math.random()*9) + "%";
item.style.top = "0px";
item.style.color = ((Math.floor(Math.random()*2) >= 1) ? '#FF68B6' : '#FFFFFF');
item.style.fontSize = Math.floor(Math.random()*20) + "px";
document.body.appendChild(item);
$('#bas_snow_' + bas.snow.snowID).animate({
top: '+=1000',
left: '' + ((Math.floor(Math.random()*2) >= 1) ? '-' : '+') + '=' + Math.floor(Math.random()*51) + '%',
fontSize: '+=30'
},10000, function(){});
window.setTimeout("bas.snow.doRemove('bas_snow_" + bas.snow.snowID + "')",bas.snow.removeTime);
};
bas.snow.doRemove = function(id){
$('#' + id).fadeOut("slow", function(){
document.body.removeChild(document.getElementById(id));
});
};
}
window.onload=function(){bas.snow.init();}
Demo: Bas' Hearts Effect
- Bas :thumbup:
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Kinda hard to change a few images / texts, huh?
Re: Hearts effect for each CMS
There are no images..
JUst change "bas.snow.text" ;)
Re: Hearts effect for each CMS
Quote:
Originally Posted by
PEjump2
Kinda hard to change a few images / texts, huh?
Kinda hard to see PuhekuplaCMS, huh?:closedeyes:
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Like it exept the "snow" bit xD
Re: Hearts effect for each CMS
Quote:
Kinda hard to see PuhekuplaCMS, huh?
Lol IKR what he been working on this cms for so long i saw Half of it like 4 months ago it should have been done...
Re: Hearts effect for each CMS
im feeling the love man haha
Re: Hearts effect for each CMS
I love the part where the demo doesn't work, but thanks for the share.
Re: Hearts effect for each CMS
Quote:
Originally Posted by
Moogly
I love the part where the demo doesn't work, but thanks for the share.
http://www.pixelenhotel.nl/
Quote:
This account has been suspended.
Either the domain has been overused, or the reseller ran out of resources.
Re: Hearts effect for each CMS
it was working before. o well should have got a offshore host because nubs have a habit of reporting it as a phising site
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Re: Hearts effect for each CMS
Wtf thanks for this, and ur cms is amazing xD
Re: Hearts effect for each CMS
Thank you for this, I like it =D
Re: Hearts effect for each CMS
nice codes, but demo link dont work.