Targeting specific class with .find
<p>As a continuation of this question - <a href="http://stackoverflow.com/questions/15956629/find-checkboxes-that-are-checked-with-a-specific-class">Find checkboxes that are checked with a specific class</a></p>

<p>Is it possible to do the same with this jquery - I only want to target specifically the checkbox inputs with the class "correct"?</p>

<pre><code>jQuery(function($) {
$(document).ready(function () {
    $("input[type=checkbox]").click(function (e) {
        if ($(e.currentTarget).closest("div.question").length &gt; 0) {
            toggleInputs($(e.currentTarget).closest("div.question")[0]);        
        }
    });
});

function toggleInputs(questionElement) {
    if ($(questionElement).data('max-answers') == undefined) {
        return true;
    } else {
        maxAnswers = parseInt($(questionElement).data('max-answers'), 10); 
        if ($(questionElement).find(":checked").length &gt;= maxAnswers) {
            $(questionElement).find(":not(:checked)").attr("disabled", true);
        } else {
            $(questionElement).find("input[type=checkbox]").attr("disabled", false);
        }
    }
}
});
</code></pre>
