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

Placeholder replacing value on tab or click #2

Closed
jskrumm opened this issue May 21, 2013 · 0 comments
Closed

Placeholder replacing value on tab or click #2

jskrumm opened this issue May 21, 2013 · 0 comments
Labels

Comments

@jskrumm
Copy link

jskrumm commented May 21, 2013

I had an issue where once you tabbed away from the input it was replacing the value with the placeholder. This is because you are checking for an attribute of value, when you should be checking for value like such: $(this).val(). When the user types into an input field the value attribute doesn't get updated. The attribute value is only for setting a default attribute so if you try to set a default attribute and the value is blank then your on blur will fail. You can change your code to check for user input using $(this).val() and that will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant