title: How to call a JavaScript function that displays a block of code with custom message?
body: <p>What I want is to call the <code>showPopup('text goes here');</code> function and the below block of code to be shown with my text in it.</p>
  
  <p>How can I achieve this?</p>
  
  <pre><code>function showPopup(data) {
  
  }
  
  
      &lt;a class="fragment" href="#"&gt;
  &lt;span id='close' onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode); return false;'&gt;x&lt;/span&gt;
    &lt;div class="content"&gt;
      // I WANT TO PUT MY TEXT HERE
    &lt;/div&gt;
      &lt;/a&gt;
  </code></pre>