How to modify an image's attr use jquery? I want set the image's height as the window.height
<script type="text/livescript"> $(document).ready(function(){ var height = $(window).height(); $('img').attr('height',height); }); </script> <img src="http://farm7.static.flickr.com/6124/6022097678_4477a09976_o.jpg" />