[jQuery] Slider is not initialized in IE6 & IE 7
hello,
for a slider with stepping i used/changed the following script:
In IE6/IE7/Safari, the moveTo--Function does not work (when i don't
move the slider before).
In Firefox it works fine.
Maybe someone has an idea...
thanks & greets,
Joerg Kaimer
window.onload = function () {
var container = $('div.sliderGallery');
var ul = $('ul', container);
var itemsWidth = ul.innerWidth() - container.outerWidth();
$('.slider', container).slider({
minValue: 0,
maxValue: itemsWidth,
handle: '.handle',
stop: function (event, ui) {
ul.animate({'left' : ui.value * -1}, 1);
},
slide: function (event, ui) {
ul.css('left', ui.value * -1);
}
});
$(".btn-slide-l").click(function(){
// this function does not work directly
$('.slider', container).slider("moveTo","-250px");
});
$(".btn-slide-r").click(function(){
// this function does not work directly
$('.slider', container).slider("moveTo","250px");
});
};
<div id="container">
<div class="sliderGallery">
<ul>
<li>16<img src="something.jpg" width="220" height="142" /