hello, iam very new in jQuery. Need help asap please. on my asp.net page I want to use two jQuery functions.
1. Clears textBox when user clicks on it.
2. Clears all inputs when user clicks on btnCancel button.
I made two functions
//clears value from onclicked input
$(document).ready(function () {
$("input").click(function () {
$(this).val(""); //clears value from onclicked input
});
});
//Clears all when reset button is pressed
$(document).ready(function () {
$("#btnCancel").click(function () {
$('input').val("");
});
});
The problem that this code won't work together. Perhaps I do not combine it in the right way? Please help!