NovelProjects

Monday, January 26, 2009

jQuery Slider

I just upgraded my project to the latest version of jQuery (currently 1.3), and everything seemed to be working fine, except some sliders I was using. After lots of trial and error to figure out what the problem was, I stumbled across the answer. The problem was that the slider was defaulting to vertical orientation instead of horizontal (which it was defaulting to before). If you're seeing these issues, change your code to look similar to this:



$('.slider').slider({
min: 0,
max: 100,
value: 20,
orientation: 'horizontal',
slide: function(event, ui) {
//slide function
}
});

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.