开发者

what jQuery library does this?

开发者 https://www.devze.com 2023-03-01 05:54 出处:网络
I want to be a开发者_StackOverflowble 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.

I want to be a开发者_StackOverflowble 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.

what jQuery library does this?

Is there a library for this?


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.


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消