Skip to content

Replace window.onload with $(document).ready()#151

Open
pdclark wants to merge 1 commit into
philbuchanan:masterfrom
pdclark:patch-1
Open

Replace window.onload with $(document).ready()#151
pdclark wants to merge 1 commit into
philbuchanan:masterfrom
pdclark:patch-1

Conversation

@pdclark

@pdclark pdclark commented Sep 12, 2021

Copy link
Copy Markdown

The window onload event waits until all images in the document finish loading.
This causes there to be a long wait time between when accordions display and when accordions are functions.
DOMReady is a more appropriate event — this fires when the page HTML and JavaScripted is parsed and ready for manipulation.
This change causes accordions to be functional immediately.

The window onload event waits until all images in the document finish loading.
This causes there to be a long wait time between when accordions display and when accordions are functions.
DOMReady is a more appropriate event — this fires when the page HTML and JavaScripted is parsed and ready for manipulation.
This change causes accordions to be functional immediately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant