B baokyrox BANNED Joined Oct 10, 2008 Messages 428 Reaction score 34 Dec 8, 2011 #1 service done by myself...~_~ Last edited: Dec 8, 2011
S sockpuppet Junior Member Joined Nov 7, 2011 Messages 183 Reaction score 174 Dec 8, 2011 #3 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
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