title: jQuery : width & height attribute value of <embed> tag on load
body: <p>I have an embed tag.</p>
  
  <pre><code>&lt;embed id="embed1" src="test.mp4" width="320" height="260" &gt;&lt;/embed&gt;
  </code></pre>
  
  <p>How to change the width &amp; height attribute of <code>&lt;embed&gt;</code> tag on load using JavaScript / jQuery ? I know how to set the attribute value by the following script:</p>
  
  <pre><code>$(document).ready(function() {
    $('#embed1').attr('width', '320');
  });
  </code></pre>
  
  <p>I can set the width to 100%, but what will be the value of height attribute?</p>
  
  <pre><code>&lt;embed id="embed1" src="test.mp4" width="100%" height="?" &gt;&lt;/embed&gt;
  </code></pre>
  
  <p>I wish I can omit the height attribute, or set it to auto .</p>
  
  <p><strong>Note</strong>: Given that I can't use HTML5 <code>&lt;video&gt;</code> tag as I have to backward support older browsers.</p>