title: How to open Modal popup on button click
body: <p>I have this link-button:</p>
  
  <pre><code>&lt;a href="javascript: void(0)"&gt;&lt;button class="btn btn-primary pull-right" id="btn"&gt;Read More&lt;/button&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I want <code>onclick</code> hit, a modal popup appears with all the article details.I have tried a lot until now but nothing runs properly.Any ideas?</p>
  
  <p>UPDATED</p>
  
  <pre><code>$(document).ready(function () {
  $('#dialog').dialog({
      autoOpen: false
  })
  $('#btn').click(function() {
      $("#dialog").dialog({
          modal: true,
          height: 600,
          width: 500,
  
          buttons: {
              Accept: function() {
                  $(this).dialog("close");
              }
          }
      });
      $('#dialog').dialog('open');
  });
  });
  </code></pre>
  
  <p>UPDATED (image)</p>
  
  <p><a href="https://i.stack.imgur.com/IOz3a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IOz3a.png" alt="RESULT"></a></p>