Website page slider using left arrow and right arrow.
What I have at the moment, is a row of buttons and a website that slides left to right, the buttons make the slider move as below:
Code:
<span><a id="link1" href="#" title="Home"> home </a></span>
<span><a id="link2" href="#" title="Profile"> profile </a></span>
<span><a id="link3" href="#" title="Gallery"> gallery </a></span>
<span><a id="link4" href="#" title="Contact"> contact </a></span>
And here is the jscript:
Code:
$('link1').addEvent('click', function(event){
event = new Event(event).stop();
scroll.toElement('content1');
});
$('link2').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content2');
});
$('link3').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content3');
});
$('link4').addEvent('click', function(event) {
event = new Event(event).stop();
scroll.toElement('content4');
});
So what the "customer" now wants is to have a left pointing arrow to the left of the buttons and a right pointing arrow to the right, so that they think the user will be happy to use them as they give the user more feedback.
So I'm guessing that i will need to have a count function that when it relates to a certain number it calls one of the right functions above to make it move.
All that up there works perfect so will keep that, just need a bit of help with the 2 buttons.
So i would have something like this:
Code:
<span><a id="?" href="#">Left Button Image</a></span>
<span><a id="link1" href="#" title="Home"> home </a></span>
<span><a id="link2" href="#" title="Profile"> profile </a></span>
<span><a id="link3" href="#" title="Gallery"> gallery </a></span>
<span><a id="link4" href="#" title="Contact"> contact </a></span>
<span><a id="?" href="#">Right Button Image</a></span>