ブラウザのサイズ変更イベントをキャッチする次のコードがあります。
window.onresize = function(){
var style = $('#button-selection').position();
if(style == "relative"){
$("#button-section").css("position"," ");
}else if(style == "fixed"){
$("#button-section").css("position","relative");
}
};
window.onresize = function(){
var style = $('#button-selection').css('position');
if(style == "relative"){
$("#button-section").css("position"," ");
}else if(style == "fixed"){
$("#button-section").css("position","relative");
}
};
スタイルは undefined を返します。ドキュメントの準備ができたら、これを実行しています。window ready を使用してみましたが、結果は同じです。上記のメソッドはどちらも undefined を返します!