出於某種原因,這個頁面將不會在歌劇+ 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