Advertisement
Advertisement
| 02.07.2008 at 03:51AM PST, ID: 23144098 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: |
I have this code in my HEAD :
<script type="text/javascript" src="mootools.v1.11.js"></script>
<script type="text/javascript" src="mooticker.js"></script>
<script type="text/javascript">
// Create ticker at domready state
window.addEvent('domready',function() {
var myTicker = new Ticker('newsticker',{toggleButton:'toggle'});
});
</script>
and this code in my BODY:
<div id="newsSubContainer">
<div id="newsticker">
<ul>
<li>TEST 1</li>
<li>TEST 2</li>
<li>TEST 3</li>
<li>TEST 4</li>
</ul>
</div>
<div id="toggle"></div>
</div>
Here is the code from mooticker.js if it may help:
// mooticker - Newsticker class
// Original copyright 2006 Wolfgang Bartelme, Bartelme Design - http://bartelme.at
//
// Ported and edited for mootools by Huug Helmink, Ace Group bv - http://www.acegroup.nl
// version 0.2
// date 2007-09-26
//
//
// moootools v.11 classes
// Core: Core
// Class: Class, Class.Extras
// Native: Array, String, Function, Number, Element
// Element: Element.Event, Element.Filters, Element.Selectors
// Window: Window.DomReady
// Effects: Fx.Base, Fx.CSS, Fx.Style
//
//
// Usage:
// var myTicker = new Ticker('idOfDivElement');
// or (with options)
// var myTicker = new Ticker('idOfDivElement',{toggleButton:'idOfToggleDiv',interval:####});
// with #### as an integer > 2000
//
//
var Ticker = new Class({
// Define options
options: {
toggleButton: false,
interval: 5000
},
initialize: function(containerId,options) {
// Declare variables
var Appear,myFade,myBlinder;
// Set container div
this.container = $(containerId);
// Set options
this.setOptions(options);
this.interval = this.options.interval;
this.toggleButton = $(this.options.toggleButton);
this.messages = $(this.container).getElements('li');
this.number_of_messages = this.messages.length;
if (this.number_of_messages == 0) {
this.showError();
return false;
}
this.current_message = 0;
this.previous_message = null;
// Create toggle button when ID is supplied with options
if (this.toggleButton != false) {
this.toggle_button = new Element('a').setProperties({
'href': 'http://www.infinitymotorcycles.com/news.asp',
'id': 'togglenewsticker'
}).setHTML('More...').addEvent('click',this.toggleTicker.bind(this));
this.toggleButton.adopt(this.toggle_button);
}
// Display first message
this.hideMessages();
this.showMessage();
// Install timer
this.timer = this.showMessage.periodical(this.interval,this);
},
showMessage: function() {
Appear = new Fx.Style(this.messages[this.current_message],'opacity',{onStart:function(item) {
item.setStyle('display','block');
}}).start(0,1);
this.fadeMessage.delay(this.interval-2000,this);
if (this.current_message < this.number_of_messages-1) {
this.previous_message = this.current_message++;
} else {
this.current_message = 0;
this.previous_message = this.number_of_messages - 1;
}
},
fadeMessage: function() {
myFade = new Fx.Style(this.messages[this.previous_message],'opacity',{onComplete:function(item) {
item.setStyle('display','none');
}}).start(1,0);
},
hideMessages: function() {
this.messages.each(function(message) {
message.setStyles({
'display': 'none',
'opacity': 0
});
})
},
toggleTicker: function() {
myBlinder = new Fx.Slide(this.container,{duration:1000});
},
// Display error message when there is no list, or the list is empty
showError: function() {
if ($ES('ul',this.container).length == 0) {
this.list = new Element('ul');
this.container.adopt(this.list);
} else {
this.list = $E('ul',this.container);
}
this.errorMessage = new Element('li',{
'class': 'error'
}).setHTML('Could not retrieve data');
this.list.adopt(this.errorMessage);
}
});
Ticker.implement(new Options);
|