Skip to content

Instantly share code, notes, and snippets.

Created February 9, 2011 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/818229 to your computer and use it in GitHub Desktop.
Save anonymous/818229 to your computer and use it in GitHub Desktop.
<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