title: Add a client-side checkbox clicked handler to Razor view
body: <p>The following markup generates an input of type checkbox with an <code>id="IsRecurring"</code> when a Razor view is sent to the browser.</p>
  
  <pre><code>&lt;div class="editor-label"&gt;
      @Html.LabelFor(model =&gt; model.IsRecurring)
  &lt;/div&gt;
  
  &lt;div class="editor-field"&gt;
      @{
          @Html.EditorFor(model =&gt; model.IsRecurring)
      }
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to show/hide other markup block, based on the checked state of the checkbox.</p>
  
  <p>Which is the most MVC3 way to do it?</p>
  
  <p>My plan is to go with adding the following script above the div:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("#IsRecurring").click(function () {
          do show hide;
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Where is the appropriate place in my View markup, to place the script? Is there a better way I can reference <code>IsReccuring</code> checkbox, rather then knowing what Id it's going to have in advance?</p>