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

Select box doesn't render if added dynamically! #275

Closed
ajrehman opened this issue Dec 16, 2014 · 5 comments
Closed

Select box doesn't render if added dynamically! #275

ajrehman opened this issue Dec 16, 2014 · 5 comments

Comments

@ajrehman
Copy link

The select box is not rendering if added dynamically using Javascript. If the select box exists on the html when initial page rendering takes place, it shows up and styles itself. Otherwise, it doesn't show up at all if appended to the page.

I even tried calling: $(".selec-dropdown").dropdown();

Still nothing. Any idea what could fix this. I am using the most current and updated version of Materialize.

@Dogfalo
Copy link
Owner

Dogfalo commented Dec 16, 2014

Duplicate of #166

@Dogfalo Dogfalo closed this as completed Dec 16, 2014
@ajrehman
Copy link
Author

This issue is still happening even after fixing the issue 166. The code does not deal with SELECT input boxes at all, hence it never gets initialized again ever!

@Dogfalo
Copy link
Owner

Dogfalo commented Dec 23, 2014

If you have the latest code, it should work.

@acburst
Copy link
Collaborator

acburst commented Dec 23, 2014

And you need to call the plugin again once you've added the select dynamically

@ajrehman
Copy link
Author

Okay I will give it a try, so just call this again?

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

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

3 participants