title: why to use '$' in javascript variables?
body: <p>I've seen others do these things to create a dynamic table element or other HTML on a page:</p>
  
  <pre><code>var $myRow = $('#myRowContainer' + IDRow);
  var $column = $('&lt;div /&gt;', { 'class': 'col', 'css': { 'width': '30%' } }).appendTo($myRow);
  $('&lt;div /&gt;', { css: { 'text-align': 'left' } }).append($('&lt;span /&gt;', { 'html': objDetails[0].message })).appendTo($column);`
  </code></pre>
  
  <p>I often create html stuff in javascript like:</p>
  
  <pre><code> jQuery.each(mytable, function (i, obj) {
                      var newrow = ' &lt;tr&gt; ';
                      newrow += ' &lt;td&gt; ';
                      newrow += ' &lt;span&gt; ' + obj.ID + '&lt;/span&gt;';
                      newrow += ' &lt;/td&gt; ';
                      newrow += ' &lt;td&gt; ';
                      newrow += ' &lt;span&gt; ' + obj.PartNumber + ' &lt;/span&gt;';
                      newrow += '&lt;/td&gt;';
                      newrow += ' &lt;td&gt; ';
                      var name1 = 'txEI_';
                      var consecutive = obj.IDc;
                      var idLabelText = name1 + consecutive;
                      newrow += ' &lt;input id="' + idLabelText + '" class="' + myCssClassToDetect + '" type="text" value="0" /&gt; ';
                      newrow += ' &lt;/td&gt; ';
                      newrow += ' &lt;/tr&gt; ';
                      $("#tbDesglose").append(newrow);
                      //make spinner for new field
                      makeSpinner(idLabelText);
                  });
  </code></pre>
  
  <p>What's the difference? Why choose one over another?</p>