FIX My PHP Dropdownlist ISSUE $10

Status
Not open for further replies.
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
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top