[jQuery] UI Slider Tearing in Firefox

2009-03-27 Thread twiivoid

Ok, this is really bothering me. In IE7 and IE8, Opera 9 and 10a,
Safari 3 and 4b, the jqueryUI slider works beautifully. However in
Firefox (3.1b3), the slider handle tears while being dragged. I can't
figure out what is causing it. Does firefox have a really slow refresh
rate causing this tearing, or what is going wrong here. It only seems
to be a problem with my code, as the slider on the example page works
fine.

Slider code below...

$('div.scrollbar').slider({
animate: true,
change: sliderChange,
slide: sliderSlide
});
function sliderChange(e, ui)
{
var maxScroll = $('div.thumbnails').attr('scrollWidth') 
-

$('div.thumbnails').width();
$('div.thumbnails').animate({scrollLeft: ui.value * 
(maxScroll /
100) }, 1000);
}
function sliderSlide(e, ui)
{
var maxScroll = $('div.thumbnails').attr('scrollWidth') 
-

$('div.thumbnails').width();
$('div.thumbnails').attr({scrollLeft: ui.value * 
(maxScroll /
100) });
}


[jQuery] UI Slider Tearing in Firefox

2009-03-27 Thread twiivoid

Ok, this is really bothering me. In IE7 and IE8, Opera 9 and 10a,
Safari 3 and 4b, the jqueryUI slider works beautifully. However in
Firefox (3.1b3), the slider handle tears while being dragged. I can't
figure out what is causing it. Does firefox have a really slow refresh
rate causing this tearing, or what is going wrong here. It only seems
to be a problem with my code, as the slider on the example page works
fine.

Slider code below...

$('div.scrollbar').slider({
animate: true,
change: sliderChange,
slide: sliderSlide
});
function sliderChange(e, ui)
{
var maxScroll = $('div.thumbnails').attr('scrollWidth') 
-

$('div.thumbnails').width();
$('div.thumbnails').animate({scrollLeft: ui.value * 
(maxScroll /
100) }, 1000);
}
function sliderSlide(e, ui)
{
var maxScroll = $('div.thumbnails').attr('scrollWidth') 
-

$('div.thumbnails').width();
$('div.thumbnails').attr({scrollLeft: ui.value * 
(maxScroll /
100) });
}