Disable checkboxes based on status of one checkbox
<p>if 'choose not to answer' is checked, i need to disable the other checkboxes, here is my code and html, any help as to why it's not working?</p>

<p><strong>code</strong></p>

<pre><code>function toggleStatus() {
if ($('#toggleElement').is(':checked')) {
    $('#living :input').attr('disabled', true);
} else {
    $('#living :input').removeAttr('disabled');
}
</code></pre>

<p><strong>html</strong></p>

<pre><code>&lt;p&gt;With whom do you live? Choose all that apply&lt;br/&gt;
    &lt;input type="checkbox" name="living" value="alone" id="living"&gt;
    Live alone &lt;br&gt;
    &lt;input type="checkbox" name="living" value="husband" id="living"&gt;
    Husband &lt;br&gt;
    &lt;input type="checkbox" name="living" value="partner" id="living"&gt;
    Partner &lt;br&gt;
    &lt;input type="checkbox" name="living" value="children" id="living"&gt;
    Children &lt;br&gt;
    &lt;input type="checkbox" name="living" value="parents" id="living"&gt;
    Parents &lt;br&gt;
    &lt;input type="checkbox" name="living" value="other_relatives" id="living"&gt;
    Other relatives &lt;br&gt;
    &lt;input type="checkbox" name="living" value="religion" id="living"&gt;
    Religious order &lt;br&gt;
    &lt;input type="checkbox" name="living" value="no_answer" 
                id="toggleElement"&gt;
    Choose not to answer &lt;br&gt;
&lt;/p&gt;
</code></pre>
