How can I get this code to only execute its button:
<span id="spanClicker">
<span id="subClicker">
[Click Me]
</span>
</span>
like this fiddle: http://jsfiddle.net/rpCVy/
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.
http://jsfiddle.net/malet/rpCVy/3/
You can use
e.stopPropagation()to prevent the click event firing for both elements.Also on a side note the
.livefunction is deprecated as of jQuery 1.7.onshould be used instead.