This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
tutorials:zencartmods:blog_ticker.html [2011/08/01 16:00] daigo |
tutorials:zencartmods:blog_ticker.html [2016/01/28 18:05] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| ==== Create a Blog Ticker on your homepage ==== | ==== Create a Blog Ticker on your homepage ==== | ||
| + | |||
| + | {{:tutorials:zencartmods:ticker.jpg?|}} | ||
| + | |||
| Line 70: | Line 74: | ||
| We need to make the **tickerFade()** function now, which we can place in a new files called **includes/templates/YOUR_TEMPLATE/jscript/jscript_ticker.js** | We need to make the **tickerFade()** function now, which we can place in a new files called **includes/templates/YOUR_TEMPLATE/jscript/jscript_ticker.js** | ||
| - | Here's what our's looks like | + | Here's what our (slightly hacky) code looks like |
| <code javascript> | <code javascript> | ||
| Line 94: | Line 98: | ||
| fadeIn(tickerNum); | fadeIn(tickerNum); | ||
| if(ticker == 0) { | if(ticker == 0) { | ||
| - | fadeOut(num_posts-1); | + | fadeOut(num_posts-1); |
| - | outString = "tickerText" + num_posts - 1; | + | outString = "tickerText" + num_posts - 1; |
| } | } | ||
| else { | else { | ||
| Line 129: | Line 133: | ||
| document.getElementById(thing).style.opacity = beta/100; | document.getElementById(thing).style.opacity = beta/100; | ||
| document.getElementById(thing).style.filter = 'alpha(opacity=' + beta + ')'; | document.getElementById(thing).style.filter = 'alpha(opacity=' + beta + ')'; | ||
| - | |||
| - | |||
| setTimeout("fadeOut("+ tickerNum +")", 50); | setTimeout("fadeOut("+ tickerNum +")", 50); | ||
| } | } | ||