var scroll = new Fx.Scroll('left', {
wait: false,
duration: 1000,
transition: Fx.Transitions.Cubic.easeOut
});
var q = 100;
var scroll_a = 100;
$('bottom_hoekje').addEvent('click', function(event) {
var end = $('text').getStyle('height').toInt();
var test = $('band').getStyle('height').toInt();
var maxi = end - test;
event = new Event(event).stop();
if(q<maxi){
scroll.scrollTo(0,q);
q = q+scroll_a; //scroll ammount.
}else{
scroll.scrollTo(0,maxi);
}
alert(maxi);
//console.log(q + '&&' + maxi);
});
1.346 views
Het stukje hieronder werkt prima in in ie7 en ff, maar ie6 wil nog niet. Het onclick gaat goed (vandaar de alert) maar hij scrolt niet. Ziet iemand onlogische fouten.