12345678910111213141516171819202122 |
- function clickGestures(item) {
- let openItem = document.getElementById('item-'+item);
- openItem.addEventListener('click', function(e) {
- if (document.getElementById('modal-'+this.id).style.display === '') {
- document.getElementById('modal-'+this.id).style.display = 'none';
- return;
- }
- document.getElementById('modal-'+this.id).style.display = '';
- });
- let closeItem = document.getElementById('close-'+item);
- closeItem.addEventListener('click', function(e) {
- let ritem = this.id.replace('close','item');
- if (document.getElementById('modal-'+ritem).style.display === '') {
- document.getElementById('modal-'+ritem).style.display = 'none';
- return;
- }
- document.getElementById('modal-'+ritem).style.display = '';
- });
- }
|