javascript - Hide div with close button jquery only with associated div -


This is what I am trying to do, stop notification times if X is clicked inside it.

Here is my code:

  $ ('# closebutton'). ('Click', function (e) {$ ('# previewbox'). Remove ();});   

How do I create it, it only closes the warning with which it is connected, though instead of removing all. I'm sure the code requires the word "this" but I do not understand.

Use jquery to obtain the parent of each element in the current set of an element, alternate form Filtered by a selector from. Try it out:

  $ ('# close'). ('Click', function (e) {$ (this) .Parent ('. Alert'). Remove ();});   



Comments

Popular posts from this blog

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -