I have an issue where the carousel moves the right amount on each click in Firefox and IE. However in Chrome and Safari, it doesn't appear to move along enough when the 'next' and 'previous' buttons are clicked.
I have noticed this is in jquery.jcarousel.js :
margin: function(e, p) {
if (!e)
return 0;
var el = e.jquery != undefined ? e[0] : e;
if (p == 'marginRight' && $.browser.safari) {
var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;
$.swap(el, old, function() { oWidth = el.offsetWidth; });
old['marginRight'] = 0;
$.swap(el, old, function() { oWidth2 = el.offsetWidth; });
return oWidth2 - oWidth;
}
return $jc.intval($.css(el, p));
},
So I am led to believe this is an issue with Safari/Chrome not 'reading' the margins set on the 'li' properly. Can anyone recommend how to get it moving the right amount in these browsers please?
Comments
Comment #1
th88 commentedSafari/Chrome doesn't seem to like margins. Recreated without margins, works ok.
Not fixed, just a workaround
Comment #2
3dloco commentedSee this post about this issue, I found it very useful
http://stackoverflow.com/questions/1997993/jcarousel-doesnt-work-properl...