Pour une raison quelconque cette page ne fonctionne pas dans Opera + Safari http://dev.reggi.com/clients/mike2/Javascript Opera + Safari
c'est le code principal, j'ai écrit que je crois ne pas:
/*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");
});
Vous pouvez déplacer votre 'bind ('load resize')' dans une fonction 'ready()'. J'ai vu des liaisons de fonctions mystérieuses échouer dans un certain nombre de navigateurs parce qu'elles ne sont pas faites dans la fonction 'ready()'. – staticsan