mhpreiman
11/30/2017 - 12:19 AM

multiple popups jquery

<div id="myElement"></div>
var popup1 = '<div class="popup"><a href="#">&#10006;</a><p>Esimene popup</p></div>';
var popup2 = '<div class="popup"><a href="#">&#10006;</a><p>Teine popup</p></div>';

$('#myElement').after(popup1, popup2);

$('.popup').click(function() {
  $(this).hide();
});