FIX My PHP Dropdownlist ISSUE $10

the document has not finished loading when you try to populate your dropdownlist, you have to put the code inside the jquery ready function
Code:
$(document).ready(function() {
  $.each(chapter_list, function(i,c) {
      $('#top_chapter_list, #bottom_chapter_list').append(
          $('<option></option>').val( c[0]).html(c[1])
      );
  });
});

edit:
haha, lol too late
edit2:
at least my code looks nicer
 
Back
Top