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
Note: This is about documentation, rather than bootstrap core. I cannot find a repo for getbootstrap.com directly.
The 'usage' section of Modal documentation ( https://getbootstrap.com/docs/5.3/components/modal/#usage ) discusses how to toggle and dismiss modals, the examples result in an action occurring (e.g., the modal is shown, toggled etc)
The following section, 'Via JavaScript' ( https://getbootstrap.com/docs/5.3/components/modal/#via-javascript ) discusses how to obtain a Modal object reference but contains no actionable samples - it took me a while to realize that the subsequent 'methods' section exposed how to actually show a dialog.
I think that replacing the code block within 'Via Javascript' from
const myModal = new bootstrap.Modal(document.getElementById('myModal'), options)
// or
const myModalAlternative = new bootstrap.Modal('#myModal', options)
To:
const myModal = new bootstrap.Modal(document.getElementById('myModal'), options)
// or
const myModalAlternative = new bootstrap.Modal('#myModal', options)
// Show a dialog, see 'Methods' for more JavaScript functionality
myModal.show();
Would make a lot of sense from a reader point of view, particularly as the 'Options' and 'Methods' sections are at the same h3 heading depth as the javascript section (I can understand why, but I assumed they were unrelated documentation to what I was after).
Reduced test cases
As above, documentation change only.
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.3
The text was updated successfully, but these errors were encountered:
Prerequisites
Describe the issue
Note: This is about documentation, rather than bootstrap core. I cannot find a repo for getbootstrap.com directly.
The 'usage' section of Modal documentation ( https://getbootstrap.com/docs/5.3/components/modal/#usage ) discusses how to toggle and dismiss modals, the examples result in an action occurring (e.g., the modal is shown, toggled etc)
The following section, 'Via JavaScript' ( https://getbootstrap.com/docs/5.3/components/modal/#via-javascript ) discusses how to obtain a Modal object reference but contains no actionable samples - it took me a while to realize that the subsequent 'methods' section exposed how to actually show a dialog.
I think that replacing the code block within 'Via Javascript' from
To:
Would make a lot of sense from a reader point of view, particularly as the 'Options' and 'Methods' sections are at the same h3 heading depth as the javascript section (I can understand why, but I assumed they were unrelated documentation to what I was after).
Reduced test cases
As above, documentation change only.
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.3
The text was updated successfully, but these errors were encountered: