Closed kalmerrautam closed 6 years ago
It's because you're creating a lightbox with .outerHTML
. This grabs the HTML and places it into a lightbox. The original HTML however stays, meaning that you have the same input id
twice. Clicking the label will toggle the HTML that is not visible.
I recommend to remove the original HTML before you show the lightbox: https://jsfiddle.net/x0cpe4y2/
I'm planning to update basicLightbox to make using existing elements easier. basicLightbox.from(elem)
for example (related to #17).
When I place radio buttons with labels inside BasicLightbox, then activating radio buttons with label click won't work.
Same radios with labels work perfectly when BasicLightbox is removed.
See fiddle: https://jsfiddle.net/kalmerrautam/8kvw76er/2/