skip to Main Content

I use svelte and flowbite that contain Popover view.

By default popover view display above element that trigged it. How to display popover above other element? For example, I click button in bottom of page and popover display in top of page above some textfield. I mean that display place and trigger element are different.

enter image description here

<button data-popover-target="popover-click" data-popover-trigger="click" type="button" class="...">
    <div class="...">
        <h3 class="...">Popover click</h3>
    </div>
    <div class="...">
        <p>And here's some amazing content. It's very engaging. Right?</p>
    </div>
    <div data-popper-arrow></div>
</div>

2

Answers


  1. try this one

    <div class="..." style="position: relative;">
        <p>And here's some amazing content. It's very engaging. Right?</p>
        <div data-popper-arrow></div>
    </div>
    
    Login or Signup to reply.
  2. You can create another button and then trigger click

    $('#button').click(function(){
       $('#the_div_want_to_show').popover('toggle');
    });
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search