Grow your CSS skills. Land your dream job.

jQuery close current DIV

  • # April 5, 2013 at 10:41 am

    Alright guys I am a newbie to jQuery and cant get this one figure out. I have a alert message that has a (x) button to close the current popup. However the way I have it now it will close all the dialog boxes if there are multiple ones on the page. What I need is a way to only close the parent div of the (x) button.

    Here is the link to the working code: http://codepen.io/anon/pen/FxKei

    thanks!

    # April 5, 2013 at 10:52 am

    I would just use $(this).parent() for this: http://codepen.io/senff/pen/fqmFo

    # April 5, 2013 at 10:55 am

    That is exactly what I needed, thanks!

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".