-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not open HSOverlay using public method (Javascript) #194
Comments
Try this import {HSOverlay} from 'preline/preline'
addEventListener("htmx:afterSettle", () => {
const openBtn = document.querySelector('button_you_want_to_click');
openBtn.addEventListener('click', () => {
HSOverlay.open('#hs-basic-modal');
});
}); |
@vkgautham have you tried @hieuhuynh93's suggestions for the workaround? Please do let us know if you still having the issue. |
|
shows an error when pressing the button again to open the modal |
this is not working |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am working with Htmx and Preline UI and having trouble with HSOverlay. I have the following code and is not working as expected.
modal.open()
is not showing the modal but when I toggle thehidden
andopen
classes directly on themodal <div>
theoverlay
is shown. However in this way, I am not able to add backdrop classes, transitions etc.,Any idea, what I am doing wrong?
Thanks
I have the following in my tailwind config file.
The text was updated successfully, but these errors were encountered: