-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Forms components not working on dynamic content #166
Labels
Comments
Hey, |
Ok I'll wait for a next update, thank you |
AndreasArledal
added a commit
to AndreasArledal/materialize
that referenced
this issue
Dec 8, 2014
Closed
fixed in 12345fb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
I use AngularJS in my project, I want to test materialize but I have some difficulty with form components.
To get this working, I have created a function to init all components after loading dynamic content.
function init_materialize()
{
Waves.displayEffect();
var text_inputs = $('input[type=text], input[type=password], input[type=email], textarea');
text_inputs.focus(function () {
$(this).siblings('label').addClass('active');
});
text_inputs.blur(function () {
if ($(this).val().length === 0) {
$(this).siblings('label').removeClass('active');
}
});
...
}
but I don't like this solution, is there a good way to fix it?
The text was updated successfully, but these errors were encountered: