title: Dynamically changing the size of a <div> element
body: <p>I'm trying to resize a <code>&lt;div&gt;</code> when the function is called from this if statement. I know the <code>if</code> statement is working because when the function <code>mTr()</code> is called it works and I know the function <code>myFun()</code> works but for some reason the function myFun() isnt getting called.</p>
  
  <pre><code>if (window.screen.height==568) { // iPhone 4"
      document.querySelector("meta[name=viewport]").content="width=320.1";
      myFun("divId");
      mTr();
  
  }
  function myFun(id)
  {
      var obj = document.getElementById(id);
      if (obj)
      {
          obj.setAttribute("style", "height:300px;");
      }
  }
  function mTr()
  {
      alert("Hello World!");
  }
  </code></pre>