Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created January 8, 2013 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterdavis/4484231 to your computer and use it in GitHub Desktop.
Save walterdavis/4484231 to your computer and use it in GitHub Desktop.
var s = new Control.Slider('thumb','track', {axis:'vertical'});
var f = function(value){
var inner = $('innerDiv');
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);
};
/*table highlight rows*/
$('innerDiv').on('mouseover', 'tr', function(evt, elm){
elm.addClassName('over');
}).on('mouseout', 'tr', function(evt, elm){
elm.removeClassName('over');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment