重複の可能性:
JavaScript の .trim() が IE で機能しない
次のコードがありますが、IE ではトリム メソッドがサポートされていないと表示されます。
for (var i = 0; i < here.length; i++) {
if ($(here[i]).html().trim() == "")
$(here[i]).parent().find('#content').css('width', '656px'),
$(here[i]).parent().find('#content p').css('width', '430px');
if ($(another[i]).html() != null) {
if ($(another[i]).html().trim() == "")
$(another[i]).parent().parent().css('display', 'none'),
$('#sidemenu .heading').css('background', 'none');
}
}
どうすれば修正できますか?