jquery-scroll icon indicating copy to clipboard operation
jquery-scroll copied to clipboard

recreate

Open ghost opened this issue 13 years ago • 6 comments

hi, how i can recreate scrollbar on ajax response so onchange div height ?

ghost avatar Jun 09 '11 11:06 ghost

I'd like to know about this too. (This issue would probably benefit from being more descriptively named)

j0b0sapi3n avatar Jul 05 '11 22:07 j0b0sapi3n

that would be awesome... my div has relative height and i'm trying to redo the function on resize event, but nothing

miguelpeixe avatar Aug 29 '11 03:08 miguelpeixe

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.

thomd avatar Aug 29 '11 16:08 thomd

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

miguelpeixe avatar Aug 29 '11 16:08 miguelpeixe

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)

miguelpeixe avatar Aug 29 '11 16:08 miguelpeixe

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'
        });

tsukasa1989 avatar Mar 28 '12 11:03 tsukasa1989