We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$('input').val('') sets the values to "undefined" (when placeholder isn't natively supported, e.g. IE), even if .placeholder() is never invoked.
$('input').val('')
"undefined"
.placeholder()
Test case:
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="jquery.placeholder.js"></script> <script type="text/javascript"> $(function(){ $('form').submit(function(event){ event.preventDefault(); $('input').val(''); }); }); </script> </head> <body> <form> Text: <input type="text" name="txt"></input><br /> Email: <input type="email" name="eml"></input><br /> Password: <input type="password" name="pwd"></input><br /> <input type="submit" name="sbmt" value="test" /> </form> </body> </html> </pre>
The text was updated successfully, but these errors were encountered:
A workaround is to add placeholder attributes to the fields (such as placeholder="").
Sorry, something went wrong.
Fixed by merge of pull request #54.
No branches or pull requests
$('input').val('')
sets the values to"undefined"
(when placeholder isn't natively supported, e.g. IE), even if.placeholder()
is never invoked.Test case:
The text was updated successfully, but these errors were encountered: