my jquery animation code works fine in IE and firefox, but it doesn't work in Chrome and safari. any suggestions?
this is my animation code for jquery
$('#menu ul li a').click(function (e) { /* On a thumbnail click */ $('li.menuItem').removeClass('act').addClass('inact'); $(this).parent().addClass('act'); var pos = $(this).parent().prevAll().length; //.prevAll('.menuItem').length; pos = pos - 1; $('#slides').animate({ marginLeft: -positions[pos] + 'px' }, 450); /* Start the sliding animation */ e.preventDefault(); /* Prevent the default action of the link */ });
, jQuery 'px' css , , - , . css? "": "" "": "" "": " " , . css . "left" "margin-left", , , css .
left marginLeft.
left
marginLeft