How to pass js code to string gracefully?
<p>There is my code </p>

<pre><code>&lt;input type="radio" name="category" id="elementary" value="elementary" /&gt; 1
&lt;input type="radio" name="category" id="junior" value="junior" /&gt; 2
&lt;input type="radio" name="category" id="senior" value="senior" /&gt; 3
&lt;input type="radio" name="category" id="university" value="university" /&gt; 4
&lt;input type="radio" name="category" id="profession"/&gt; 5

&lt;div id='grade_select' class="clearfix"&gt;
  &lt;div id='elementary_grade' class="clearfix"&gt;&lt;/div&gt;
  &lt;div id='junior_grade' class="clearfix"&gt;&lt;/div&gt;
  &lt;div id='senior_grade' class="clearfix"&gt;&lt;/div&gt;
  &lt;div id='university_grade' class="clearfix"&gt;&lt;/div&gt;
  &lt;div id='profession_grade' class="clearfix"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I want:</p>

<p>When check one radio, need to hide all the div in grade_select, and then show the div which id include the current radio value</p>

<p>There is my js code , I do not know how to going on </p>

<pre><code>   &lt;script type="text/javascript"&gt;
    $(document).ready(function($){
      $( "input[name='category']" ).bind( "click", category_select)
    });
    function category_select(){
        $("div:[id=this.attr[id]]).show()
    }
    &lt;/script&gt;
</code></pre>

<p><strong>FYI:</strong> This question is a spinoff of <a href="http://stackoverflow.com/questions/10671865/how-to-change-muitl-divs-the-display-which-have-some-special-id">this other question</a>.</p>
