Hello.
I need to insert two protacolus scrolls at the same page, for two different texts, and I cant manage. Can you please have a look at the code, please?
In the actions palete, protacolus action, scriptacolous-packed option, Function body I write:
FOR THE FIRST SCROLL
var s = new Control.Slider('thumb','track', {axis:'vertical'});
var f = function(value){
var inner = $('innerDiv'); //change innerDiv to whatever your inner box is called
var h = (inner.getHeight() - inner.up('div').getHeight());
inner.style.top = (Math.round(value * h) * -1) + 'px';
}
s.options.onChange = function(value){
f(value);
};
s.options.onSlide = function(value){
f(value);
};
FOR THE SECOND SCROLL (I have set item names to thumb2, innerDiv2 and track2)
var s2 = new Control.Slider('thumb2,'track2', {axis:'vertical'});
var f2 = function(value){
var inner2 = $('innerDiv2'); //change innerDiv to whatever your inner box is called
var h2 = (inner2.getHeight() - inner2.up('div2').getHeight());
inner2.style.top = (Math.round(value * h2) * -1) + 'px';
}
s2.options.onChange = function(value){
f2(value);
};
s2.options.onSlide = function(value){
f2(value);
};
The first code by itself works properly with the first text, but when I add the second one, nothing works. As you can see I have changed aswell the variable names adding a number 2.
By the way… is there any other way to make a scroll (that allow to insert two scrolls in the page) and that works in tablets and mobiles? Because this one doesnt work in these devices.
Thanks a lot.
Rakel
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options