出于某种原因,这个页面将不会在歌剧+ Safari上http://dev.reggi.com/clients/mike2/的Javascript歌剧+ Safari的问题
这是我写的,我认为是失败的主要代码:
/*this script finds the multiples of the box_width and makes that the with of the container so the grid can be centred*/
/*sets variables*/
var box_width= 250 + 5 + 5 + 5 + 5;
/*loads the width when page starts*/
$(document).ready(function(){
var w= $(window).width();
w-= (w-10) % box_width;
if (w<box_width) w= box_width;
$('.variable_window_width').width(w);
});
/*loads the new with onpage resize*/
$(window).bind('load resize', resizeFrame);
function resizeFrame() {
var w= $(window).width();
w-=((w-10) % box_width);
if (w<box_width) w= box_width;
$('.variable_window_width').width(w);
};
$(function(){
$("#grid div").corner("4px");
});
您可能想要在'ready()'函数内移动'bind('load resize')'。我在许多浏览器中看到神秘的函数绑定失败,因为它们不在'ready()'函数中完成。 – staticsan 2010-11-21 23:29:17