how to convert javascript function to jquery
<p>I am having a javascript function. Which does the show/hide in onChange. I would like to convert it in jquery, how to do it.</p>

<p>Javacript function</p>

<pre><code>function assocWindowOnLoad()
      {
          var option=document.getElementsByName("select_id");
          document.getElementById('conent1').style.display='none';
          document.getElementById('conent2').style.display='none';
      }

function assocWindowOnChange(val)
    {
          //if user select option Select from drop down
          if(val=='')
          {   
              //alert("Please Select option from the dropdown");
          assocWindowOnLoad();
          }
          else
          {
              //Show or hide piece of code depending on user input
              document.getElementById('conent1').style.display=(val=='no')?'none':'block';
              document.getElementById('conent2').style.display=(val=='no')?'block':'none';
          }
      }
</code></pre>

<p>HTML Code</p>

<pre><code>&lt;body onLoad="assocWindowOnLoad();"&gt;
&lt;select name="select_id" id="select_id" onChange="assocWindowOnChange(this.value);" &gt;
           &lt;option value='' selected="selected"&gt;Select&lt;/option&gt;
           &lt;option value='no'&gt;1st Option&lt;/option&gt;
           &lt;option value='yes'&gt;Second Option&lt;/option&gt;
&lt;/select&gt;

&lt;div id="conent1" class="hide"&gt;

&lt;p&gt;some content&lt;/p&gt;

&lt;/div&gt;

&lt;div id="conent1" class="hide"&gt;

&lt;p&gt;some content&lt;/p&gt;

&lt;/div&gt;

&lt;div id="conent2" class="hide"&gt;

&lt;p&gt;some content&lt;/p&gt;

&lt;/div&gt;
&lt;/body&gt;
</code></pre>
