Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript .remove parent divs

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29373

    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.

    #78037
    jamygolden
    Member
    Code:
    $(“a.button”).click(function(){
    $(this).unwrap();
    });
    #78038

    thanks a lot! =)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.