Created
February 9, 2011 09:54
-
-
Save anonymous/818229 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
quoteRotator = { | |
"i":1, | |
"quotes" : [ | |
"Only the bondsmen are free!<br /><b>--Hafiz</b>", | |
"The more knowledge one has, the greater will be his fear of God. <br /><b>--Abu Bakr al-Siddiq</b>", | |
"The world is but a moment, so make it [a moment] of obedience.<br /><b>--Imam Shafi\'i</b>", | |
], | |
"num_quotes" : 3, | |
"opac":100, | |
"showFading":1, | |
"quotesInit":function(){ | |
if(this.num_quotes>0){ | |
document.getElementById('quoterotator').style.opacity=0.0 | |
document.getElementById('quoterotator').style.filter="alpha(opacity=0.0)" | |
new Effect.Appear('quoterotator',{duration:2}) | |
document.getElementById('quoterotator').innerHTML=this.quotes[0] | |
} | |
else{ | |
document.getElementById('quoterotator').innerHTML="No Quotes Found!!!" | |
} | |
if(this.num_quotes>1){ | |
setInterval("quoteRotator.quoteRotate()", 9000) | |
} | |
}, | |
"quoteRotate":function(){ | |
document.getElementById('quoterotator').style.opacity=0.0 | |
document.getElementById('quoterotator').style.filter="alpha(opacity=0.0)" | |
new Effect.Appear('quoterotator',{duration:2}) | |
document.getElementById('quoterotator').innerHTML=this.quotes[this.i] | |
this.i++ | |
if(this.i==this.num_quotes){ | |
this.i=0 | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment