What is the most beautiful way to check a checkbox in jQuery?
<p>I found many questions around this topic, but none is satisfying.</p>

<p>If you do:</p>

<pre><code>$("#myCheckBox").attr("checked", "checked")
</code></pre>

<p>It does change the attribute and check the checkbox, but it doesn't trigger the "change" event. Doesn't look clean.</p>

<p>Or you could do:</p>

<pre><code>$("#myCheckbox")[0].checked = true
</code></pre>

<p>But this is not beautiful.</p>

<p>What do you think ?</p>
