title: How to set "style=display:none;" using jQuery's attr method?
body: <p>Following is the form with id <code>msform</code> that I want to apply style="display:none" attribute to.</p>
  
  <pre><code>&lt;form id="msform" style="display:none;"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Also the check should be performed before adding the <code>"style=display:none;"</code> property. That is if it is already set like in above code it should not set again. </p>
  
  <p>But if it's not set then it should.</p>
  
  <p>How should I achieve this? Please help me.</p>