I\'m using JQuery 1.5 and the following code to detach li elements w/ a certain class when a button is clicked. What I want to know is, when that button is clicked again, h
here u can't for loop.
var demo; $('li.type').fadeOut(300, function() { demo = $(this).detach(); }); $('#replace').click(function() { $("ul#foo").append(demo); });