Reputation: 33644
I want to be able to have the following UI. When you click on the close button on top, the row below it moves to the top and so on.
Is there a library for this?
Upvotes: 0
Views: 52
Reputation: 298166
No library, just around four lines of jQuery:
$('.item').append('<div class="close">x</div>');
$('.close').live('click', function() {
$(this).parent().slideUp();
});
And a demo: http://jsfiddle.net/Blender/pEVTv/8/
Upvotes: 1
Reputation: 81384
You don't need a library for this. Just bind the click event of the close button to hide the row that it is contained in.
Upvotes: 2