
Nest
1
Вклад в тег
$(document).on('click', '.block-btn', function(e) {
e.preventDefault();
var id = $(this).attr('id');
var block = $('div[data-block-visible="' + id + '"]');
block.toggleClass('active');
});
$(document).on('click', '.custom-close', function(e) {
e.preventDefault();
var id = $(this).attr('data-block-visibled');
var block = $('div[data-block-visible="' + id + '"]');
block.removeClass('active');
});