Skip to content

Instantly share code, notes, and snippets.

@gawaooooo
Created July 11, 2012 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gawaooooo/3089082 to your computer and use it in GitHub Desktop.
Save gawaooooo/3089082 to your computer and use it in GitHub Desktop.
【jQuery】IE7でjQueryのattrが効かない
// jQueryで以下のコードを実行したら、IE7だけ効かなかった
$(ui.helper)
.find('img')
.attr({'width': '100px', 'height': '100px'})
.end()
.find('span.count').remove();
// IE7はimgのwidth, heightが変わらない
// attr->cssに変更したら解決
$(ui.helper)
.find('img')
.css({'width': '100px', 'height': '100px'})
.end()
.find('span.count').remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment