Monaca Onsen UI Discord Chat Github Repo

Popover not working properly

  • When i am trying to add popover got below error

    Cannot read property ‘show’ of null

    Sharing code below:

    <ons-button id=“popover-target”>Popover Target</ons-button>
    This is a popover!

    var target = document.querySelector("#popover-target")

  • Onsen UI

    @shweta Your document.querySelector(“ons-popover”) is not finding any element. Make sure the popover is attached to the DOM when you run that.