Skip to content
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

Mistakes in the sample code in the dropdown documentation #6634

Open
seita1996 opened this issue Apr 8, 2021 · 0 comments
Open

Mistakes in the sample code in the dropdown documentation #6634

seita1996 opened this issue Apr 8, 2021 · 0 comments

Comments

@seita1996
Copy link

There is an error in the sample code for the drop-down document.

Current Behavior

I was not able to get the dropdown to work correctly after applying this code.

$('.dropdown-trigger').dropdown();

https://materializecss.com/dropdown.html

Possible Solution

You need to wait for the HTML to load as shown below as well as the other parts.

$(document).ready(function(){
    $('.dropdown-trigger').dropdown();
});

May I submit a PR for the document?

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

No branches or pull requests

1 participant