I have a script, that works fine in FireFox, IE, but not in Chrome after F5 refresh only! It does work in chrome, if I focus the url address and click enter, but it doesnt work if I press F5, I don't get it at all, how can this have an effect on the jQuery code.
So here's the script:
$(document).ready(function() {
var width = 0;
$('#gallery img').each(function() {
width += $(this).outerWidth(true);
});
$('#offer #gallery').css('width', width + 'px');
});
And the result of Width should be 820, but I only get this if I refresh the site by focusing the url address and clicking enter, otherwise it gives the result of 90.
I tryed restarting browser and deleting cache, so the problem isn't there, any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…