Grow your CSS skills. Land your dream job.

.remove parent divs

  • # June 15, 2010 at 4:40 am

    I have several divs with buttons inside of each div. The divs and buttons are created php and jquery, some using .append to append the div and button.

    I want to remove only the div that the button is contained in when that button is clicked. How is this done?

    Thanks.

    # June 15, 2010 at 6:39 pm
    Code:
    $(“a.button”).click(function(){
    $(this).unwrap();
    });
    # June 15, 2010 at 6:44 pm

    thanks a lot! =)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".