var last;$('.track-list li').each(function(){ var $this = $(this); var $date = $this.find('.date'); var $week = $this.find('.week'); var date = $date.text(); if (last == date) { $date.addClass('hide'); $week.addClass('hide'); } last = date;})