Skip to content
Advertisement

html not appending to the carousel on popover

I Am Trying to make a popover with a bootstrap carousel and where the carousel items are to be generated and appended from a script but I get the carousel but I am unable to append the item. I tried hard but I didn’t come up with a solution.

the HTML initialized is as below

HTML:

JavaScript

the script I have tried was

Javascript:

JavaScript

I have also tried appendTo also as

JavaScript

Please Help to solve this

output I get

This is the output I get, the appended elements are not in the carousel

Note: I am using Bootstrap 5

Advertisement

Answer

It was needed to do call the click function first before popover as below

JavaScript
Advertisement