I want to do an action when a user checks a checkbox, but I can’t get it to work, what am I doing wrong?
So basically, a user goes to my page, ticks the box, then the alert pops up.
if($("#home").is(":checked"))
{
alert('');
}
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.
What you are looking for is called an Event. JQuery provides simple event binding methods like so