title: Delay opening modal
body: <p>I wanna do this:
  When you click on a button site goes to a specified section and then a bootstrap modal is opening.</p>
  
  <p>I tried just delay opening a modal, in that way sites would goes down to specified section and then modal is displaying. I tried did is with setTimeout function, but the problem is that it isnt working.</p>
  
  <pre><code>$('[data-toggle=modal]').on('click', function (e) {
  var $target = $($(this).data('target'));
  $target.data('triggered',true);
  setTimeout(function() {
      if ($target.data('triggered')) {
          $target.modal('show')
              .data('triggered',false); //
      };
  }, 2000); // milliseconds
  return false;
  });
  </code></pre>
  
  <p>Button looks like this:</p>
  
  <pre><code>&lt;div type="button" data-toggle="modal" data-target="#succes-modal"&gt;&lt;a href='#your-succes' rel="m_PageScroll2id"&gt;&lt;div class='home_slider_btn'&gt;READ MORE&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I used that script but the modal is opening right after you click on a button. I dont know why that function isnt working properly.</p>
  
  <p>Do you have some ideas? Thanks in advance!</p>