$('.reset').click(function () {
$('select[name=one]').val(opt2);
});
JSFiddle here.
What should I change?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Put
opt2in quotes forval(). It’s coming up as an error because it isundefined.You asked for some other methods, but I only know of one other. This method doesn’t require jQuery to function (note that the
[0]grabs the normalObjectrather than an jQuery wrappedObject).