$('.MovieList li').each(function(){ $(this).find('.Top').html('#' + ($(this).index() + 1)); })