How to implement the display of a modal window by clicking on one element and hiding on clicking on another with the help of toggleClass ?
My code below only works in half, i.e. adding the class .md-show works, but deleting by .md-close does not work. Is it possible that the layout of the buttons affects the DOM?
PS: .md-close is inside the block from which you want to remove the class.
$(".md-close, .md-trigger").click(function(){ $(".modal").toggleClass("md-show"); });
$(".modal")selects all elements with the modal class. On the page - Grundy