<script>
//call showPopover(this) to invoke
var showPopover = function(target) {
  document
    .getElementById('popover')
    .show(target);
};

var hidePopover = function() {
  document
    .getElementById('popover')
    .hide();
};</script>

<ons-popover direction="up" id="popover">
  <div style="padding: 10px; text-align: center;">
    <p>
      This is a popover
    </p>
    <p>
      <ons-button onclick="hidePopover()">Close</ons-button>
    </p>
  </div>
</ons-popover>