fork download
  1. mapPins.addEventListener('click', function (event) {
  2. var target = event.target;
  3. // var img = target.closest('img');
  4. var but = target.closest('button');
  5. // if (!img || !but) {
  6. if (!but) {
  7. return;
  8. } else {
  9. var x = target.id;
  10. fragmentWithOffers.appendChild(renderOffer(offers[x]));
  11. document.querySelector('.map__filters-container').removeChild(document.querySelector('.map__filters-container').lastChild);
  12. mapOffersListElement.appendChild(fragmentWithOffers);
  13. }
  14.  
Runtime error #stdin #stdout #stderr 0s 105856KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:13:2 SyntaxError: missing } after function body