title: Open popup from another function - Magnific Popup
body: <p>I want to open my popup when ajaxCall function is called.</p>
  
  <p><strong>Like this:</strong></p>
  
  <pre><code>function ajaxCall()
  {
  
   openPopup();
  
  }
  
  function openPopup()
  {
  
  $('.popup-modal').magnificPopup({
  
  type: 'inline',
  modal: false,
  
  });
  
  $(document).on('click', '.closePopup', function (e) 
              {
                  e.preventDefault();
                  $.magnificPopup.close();
              });
  
  }
  </code></pre>
  
  <p><strong>Here is the fiddle:</strong> <a href="http://jsfiddle.net/qweWa/33/" rel="nofollow">http://jsfiddle.net/qweWa/33/</a></p>
  
  <p>I want this popup to open when ajaxCall function is called.</p>
  
  <p>Here is the working fiddle for onclick button open popup:</p>
  
  <p><a href="http://jsfiddle.net/qweWa/27/" rel="nofollow">http://jsfiddle.net/qweWa/27/</a></p>