title: from plain javascript to dojo framework
body: <p>I've started to learn the dojo Toolkit and i like it so far, it seems to me easier to understand than jquery/prototype JS. I'm still new at it (and in javascript) and while there is a plethora of docs available on the net i don't really understand how to achieve simple tasks like making a hidden  visible with dojo. So to the problem:</p>
  
  <p>the html</p>
  
  <pre><code>&lt;!-- the numder in id="comment" and in href="javascript:display_comments('')" is the post_id that i want the comments to be fetched for --&gt;
  
  &lt;div class="comments"&gt;
      &lt;a id="comment8" href="javascript:display_comments('8');"&gt;comments&lt;/a&gt;(21)
  &lt;/div&gt;
  &lt;div style="visibility: hidden;" id="display_comments8"&gt;
  
  &lt;/div&gt;
  
  &lt;div class="comments"&gt;
      &lt;a id="comment7" href="javascript:display_comments('7');"&gt;comments&lt;/a&gt;(13)
  &lt;/div&gt;
  &lt;div style="visibility: hidden;" id="display_comments7"&gt;
  
  &lt;/div&gt;
  
  &lt;div class="comments"&gt;
      &lt;a id="comment15" href="javascript:display_comments('15');"&gt;comments&lt;/a&gt;(20)
  &lt;/div&gt;
  &lt;div style="visibility: hidden;" id="display_comments8"&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>the javascript</p>
  
  <pre><code>function display_comments(id) {
      divid = 'display_comments'+id;
      var element = document.getElementById(divid);
      if(element.style.visibility == 'hidden') {
          element.style.visibility='visible'
      }else if(element.style.visibility == 'visible') {
          element.style.visibility='hidden';
          element.innerHTML='';
      }
  }
  </code></pre>
  
  <p>The parameter for display_comments() in the post_id which then is merged with the words 'display_comments' so to know which div to make visible. How can this be achieved in dojo?</p>