title: Jquery - each() eq() click()
body: <p>I want to take two items of data received from HTML5 and use them in the click function and in the functions inside it.</p>
  
  <p>I'm having a problem so here's my code so far:</p>
  
  <pre><code>var test = [];
  
  // This is a div class .quiz_list_row the ids are counted as #1 #2 #3...
  $(".quiz_list_row").each(function(index){
      // Gets the data necessary
      //  It comes from data-quizlist-id (HTML5)
      $quiz_list_id = $(this).eq(index).data("quizlistId");
  
      //  It comes from data-quizlevel-reached (HTML5)
      $quiz_level_reached = $(this).eq(index).data("quizlevelReached");
  
      test[index] = $quiz_list_id;
  
      // testing
      alert("quiz_list_id: " +$quiz_list_id);
      alert("level: "+$quiz_level_reached);
  
      // click functions
      $(this).click(function(){
  
          // bla bla
          // alert(test[index]) ???
      });
  });
  </code></pre>