adit
adit

Reputation: 33644

what jQuery library does this?

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.

enter image description here

Is there a library for this?

Upvotes: 0

Views: 52

Answers (2)

Blender
Blender

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

Delan Azabani
Delan Azabani

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

Related Questions