jquery-scroll
jquery-scroll copied to clipboard
recreate
hi, how i can recreate scrollbar on ajax response so onchange div height ?
I'd like to know about this too. (This issue would probably benefit from being more descriptively named)
that would be awesome... my div has relative height and i'm trying to redo the function on resize event, but nothing
Please provide an example. Which div do you mean? What di you mean by relative height?
I've added a "repaint"-method which can be called right after a insertion of dynamic content (e.g. via ajax). Does this help?
I'm going to add some examples and a better documentation soon.
eg:
$(window).resize() {
var srollableHeight = $(window).height() / 2;
$(".scrollable").height(scrollableHeight);
$(".scrollable").scrollable();
}
each time the window is resized the function is recalled to readjust to the new height, but nothing happens, it doesn't redefine scrolling settings
in the example above i could fix defining 50% height on the css, but in my case I have other variables working to define the height (just to state that I really need to use jquery's resize event to reset my div's height)
To fix the scrollbar-handle-container, add the following code to the start of the setHandle function
// Reset scrollbar-handle-container
this.props.containerHeight = this.container.height();
this.handleContainer.css({
'height': (this.props.containerHeight - this.handleArrowUp.outerHeight(true) - this.handleArrowDown.outerHeight(true)) + 'px'
});