【发布时间】:2010-10-19 22:03:52
【问题描述】:
我正在使用 jQuery 来对齐水平视图网站上的图像,但该脚本仅在我重新加载页面时才有效。
http://joliannelm.steveforest.com/edition/roux-de-service.html
脚本在之前调用
这是脚本:
$(document).ready(function() {
var width = 0;
$('#page img').each(function() {
width += $(this).outerWidth(true);
});
$('#page').css('width', width + 50);
});
一旦页面被重新加载就可以了,但是如果你清除缓存,它又回来了......
有人知道为什么吗?谢谢。
【问题讨论】: