You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Just wondering whether I can hide a modal when page loads because by default, the modal will be shown. I can certainly hide it using javascript but during that split second when page loads, it will be shown. I don't see an option in the "trigger" to hide the modal by default until cllicked.
On a related note, is there a way to not needing to have a <button> or similar element that has the data-modal-target attribute when I'm initializing completely by JS? It seems that even if I leave out the trigger element for modals, it would always complain that the modal hasn't been initialized on the console and that I need to have a data-modal-target attribute set.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Just wondering whether I can hide a modal when page loads because by default, the modal will be shown. I can certainly hide it using javascript but during that split second when page loads, it will be shown. I don't see an option in the "trigger" to hide the modal by default until cllicked.
On a related note, is there a way to not needing to have a
<button>
or similar element that has thedata-modal-target
attribute when I'm initializing completely by JS? It seems that even if I leave out the trigger element for modals, it would always complain that the modal hasn't been initialized on the console and that I need to have adata-modal-target
attribute set.Beta Was this translation helpful? Give feedback.
All reactions