On the page there is a block that opens by clicking on the text

script> $('.item[data-for]').on('click', function(){ let data = $(this).data('for'); // Определяем data let item = $(data+'.hide'); // Ищем блок if(item.length>0) { // Существует ли такой блок на странице item.toggle("slow"); // показываем\прячем } }); </script> 

Also in the block there is a cross to close the <span class="close" id="closes">&times;</span> how to make the block hide when clicking on this cross?

  • Can anyone help? - Shared

0