title: blueimp Gallery adding delete button under images always opens gallery
body: <p>I'm trying to add a delete button under my list of images that will delete the selected image from the gallery using Ajax.</p>
  
  <p>The issue I’m having is that whenever the delete button is clicked it opens the gallery of images, the script below opens the gallery, which is opened when clicked inside of the 'links' div. So this is still initiating when I click on the Delete button but I’ve can’t seem to find away around it.</p>
  
  <p>Script</p>
  
  <pre><code>document.getElementById('links').onclick = function (event) {
      event = event || window.event;
      var target = event.target || event.srcElement,
          link = target.src ? target.parentNode : target.parentNode,
          options = { index: link, event: event },
          links = this.getElementsByClassName('image');
      blueimp.Gallery(links, options);
  };
  </code></pre>
  
  <p>Html</p>
  
  <pre><code>&lt;div id="links"&gt;
          &lt;div class="property-image"&gt;
              &lt;a class="image" href="6e575f42-1da8-4da0-bf84-7752930aea75.JPG"&gt;
                  &lt;img src=" 6e575f42-1da8-4da0-bf84-7752930aea75.JPG"&gt;
              &lt;/a&gt;
              &lt;a class="btn btn-danger delete-confirm-ajax close" data-ajax="true" data-id="72758" href=" "&gt;Delete&lt;/a&gt;
          &lt;/div&gt;
  &lt;/div&gt; 
  </code></pre>