remylab / jpaginator

A JQuery plugin for pagination with a slider
MIT License
58 stars 22 forks source link

jQuery-UI 1.9.x #2

Closed ernaniaz closed 12 years ago

ernaniaz commented 12 years ago

Hi!

The jQuery-UI release 1.9 has changed some little things and broke the slider. The bug occur because it didn't accept a value change on slider widget before initialization.

To fix that issue is very simple, we just need to add a slider call before getting "value" from slider at function moveSliderTo() at line 177 of script. The final moveSliderTo() function will be:

    function moveSliderTo(pos) {

            $this.find(".paginator_slider").slider();
            var newPc = Math.round( (pos / c.cInfMax) * 100 ) ;
            var oldPc = $this.find(".paginator_slider").slider("option", "value");

            if ( newPc != oldPc ) {
                    $this.find(".paginator_slider").slider("option", "value", newPc);
            }
    };

Cheers,

Ernani Azevedo

remylab commented 12 years ago

Thank you very much ! bug fixed.