when i use $("child").remove() or $("child").empty(), it will remove all child element from the page, i want it only remove the child element from the one parent element.
there are many more parent class on this page, so is there anyway i can remove the content only from the parent when user click on button class.. the button_parent class in same level with the parent class

Could just do $('.child', this).remove();
–
OhgodwhyOct 31 '12 at 19:03

what if i want to click the button class inside parents to remove the content. the child and button are in the same level
–
will.i.amOct 31 '12 at 19:04

You can do $(this).parent().find('.child').remove()
–
VegaOct 31 '12 at 19:05

A potential risk with this is,it will still become generic and it will allow you to do this operation on any division that currently clicked?Is that what the he wants?
–
sayannayasOct 31 '12 at 19:08

@sayannayas Yes, I believe that is what he wants.. (is there anyway i can remove the content only from the parent when user click) Incase if he want to remove specific child, then he could have wrote a handler for .child click and do a $(this).remove() on child
–
VegaOct 31 '12 at 19:09