title: dynamically create items in drop down list in bootstrap
body: <p>Small part of my html code :</p>
  
  <pre><code>&lt;div class="text-center"&gt;
  
          &lt;div class="btn-group"&gt;
              &lt;button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"&gt;
                  Platforms &lt;span class="caret"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;ul class="dropdown-menu" role="menu" id = "buttonsPlace"&gt;
              &lt;/ul&gt;
  
          &lt;/div&gt;
  </code></pre>
  
  <p>In my js file :  </p>
  
  <pre><code>for (i = 0; i &lt; platformList.length; i++) {
          var li =  $("&lt;li/&gt;" , { id : "plat"+i,class : "dropdown" text : platformList[i]  } )
          //var text = document.createTextNode(platformList[i]);
          //li.appendChild(text);
          //btn.data("platform", platformList[i] );
           $("#buttonsPlace").append(li);
          console.log("hiding");
          $("#plat" + i).hide();
      }
  </code></pre>
  
  <p>However the menu is appearing but the menu items are not. where am i going wrong</p>