I have some list elements with dynamically id changing. Next i give this id's to other element, as a class one by one. So, this is my code:
$('#rounded_items li').one({click: function(){
$('#back_button').addClass(this.id);
}});
and #back_button
receives classes 1, 2, 3, 4 from #rounded_items li
. How can i grab the last class from back_button
and give it to #rounded_items
by click.
Is there any possible to give back the last class from element who receives this class?