Slider problems

Slider problems

Hi,
I've searched all over for an answer to this so forgive me if I just
missed it somewhere.
I'm recreating the slider at the top of this page:
http://www.screeninnovations.com/projector-screens/ using the 1.7.2 UI
release. Since it was originally done using an earlier UI version I
can't seem to recreate it in 1.7.2 closely enough.
Specifically I'm having trouble getting the ul.products list to
animate when clicking on the scroll bar outside of the handle and not
animating, but rather sliding smoothly when dragging the handle. All I
can get it to do is either one or the other. I've tried the different
start, stop, change, and slide events, but it appears slide is the
only one that gets triggered when either dragging or clicking,
followed by change event afterwards.
Here's my code so far (I've removed any animate functions because they
just aren't working right):
jQuery(document).ready(function($) {
var itemWidth = jQuery("ul.products").innerWidth() - jQuery
("#gallery-content").outerWidth();
jQuery('#bar').slider({
min: 0,
max: itemWidth,
slide: function (event, ui) {
jQuery("ul.products").css("left", ui.value * -1);
jQuery("#handle").css("margin-left", ui.value / itemWidth
* -300);
}
});
});
--





























    • Topic Participants

    • john