あなたのサイトがすでにjQueryで動作している場合、別の15行の天気コードは動作しません。これは私の意見です。
jq-widthクラスを要素に追加し、min-width max-widthを使用します。 コードは、指定されたクラスの要素に中括弧を挿入します。
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
$( document .body).ready( function (){ $( '.jq-width' ).each( function (){ if ( navigator.userAgent.toLowerCase().indexOf( "msie" ) ) { var jqw_max, jqw_min ; if ( ! parseFloat(jqw_max = $( this ).css( 'max-width' )) ) jqw_max = '*' ; if ( ! parseFloat(jqw_min = $( this ).css( 'min-width' )) ) jqw_min = '0' ; $( this ).wrap( '<table border="0" cellspacing="0" cellpadding="0"><tr border="0"><td border="0" width="' +jqw_max+ '"><div width="' +jqw_min+ '">' + '</div></td></tr></table>' ); } }) }); * This source code was highlighted with Source Code Highlighter .
PS:金曜日の素晴らしいハックの後、「ブラウザを決定する方法」 dimox.name/html_js_browser_detection