HTML popover attribute isn’t working with onclick()

I want that whenever i click on btn something popover but I am facing issue with that..!
popover alone is working fine but when i add onclick() method it isn’t working.! someone plz help.

This is not Boostrap Popover but it is html in-built attribute.
This isn’t working..!

<button id="{{i.previous_details}}_{{i.reqstor_email}}" 
            class="change-btn"  
            
             popovertarget="allocation-data" 
             onclick="swap('{{i.id}}','{{i.previous_details}}','{{i.reqstor_email}}','{{i.reciver_email}}','{{i.status}}') ,suspend(this)">✔️</button>

<div id="allocation-data" popover>
</div>

But this is working fine.!

<button id="{{i.previous_details}}_{{i.reqstor_email}}" 
            class="change-btn"  
            
             popovertarget="allocation-data" >✔️</button>

<div id="allocation-data" popover>
</div>