2 different behaviors on clicking


I’m using some javascript to show a part of the page if a user answers a question correctly:

<script type="text/javascript">
	$('.magic_solution').click(function() {
	return false;
  <input type="radio" name="subtracting_radio" value="yes" id="subtracting_radio_0" />

      <span class="magic_solution"><input type="radio" name="subtracting_radio" value="no" id="subtracting_radio_0" /></span>

<div id="solution"><p><img src="../../images/user_reaction/correct_check.png" width="48" height="39" />  If you subtract 3 from 3 you get don't get a counting number.  Further, if you subtract 5 from 3 you don't get a counting number.</p>

The code works in terms of the div solution is hidden until the user clicks “no”. However, if the user clicks yes first and then no, the hidden solution shows, but the “no” button itself doesn’t become selected. Is there anyway that I can add this in to my jquery code so that the button is highlighted as well? Or am I stuck with one behavior or the other?

Thank you,


The return false part is preventing the web browser from being able to perform its default behaviour.

Thanks Paul! I had originally had it in there because I was using it to hide/unhide something when a user clicked on a link. However, it makes sense to me now that I’d want a “return false” for the link (or they’d go to another page) but not for the clicking on a bubble.