I\'m trying to change all the input name based on the list index of but it seems like it\'s not changing at all.
$(\'.test\').click(funct
You are cloning the object, so the change is done to a copy rather than the original DOM node.
Don't use clone() and you'll be fine. Or do this:
clone()
$("li.songs input").each(function(i) { $(this).attr('name', $(this).attr('name') + i); });