title: for loop is iterating over the same value
body: <p>So basically I have a set of questions(<code>&lt;div&gt;</code>s), all with the same class name and I want to simply loop through all of those classes and append the questions(<code>&lt;div&gt;</code>s) inside a container but at the minute it seems to just loop through it but only display the 1st question over and over or however many questions I put in.</p>
  
  <pre><code>if($('.option').hasClass('c_questions')){
  
    var y = document.getElementsByClassName('c_questions');
    for(var i = 0; i &lt; y.length; i++){
      $('.main-body').append($('.c_questions').html());
    }
  }
  </code></pre>