jquery isn't getting dynamically updated data from button
问题 I've created a button, which updates the values of itself, and when clicked on (again), jquery isn't picking up the updated values.. Before first click: <a href="news" data-start="2" data-limit="2" data-page="2" class="btn load-more">Load more</a> The jQuery: $(document).on('click','.load-more',function(e){ e.preventDefault(); var start = $(this).data('start'), limit = $(this).data('limit'), page = $(this).data('page'), type = $(this).attr('href'); alert( start+' '+limit+' '+page ); $.ajax({