Setting a boolean attribute with jquery
<p>I understand that jquery will allow you to modify attributes with the .attr() method. There are basically two methods:</p>

<pre><code>$('#element').attr('attribute', 'value') // sets the attribute
var attribute = $('#element').attr('attribute') // gets the attribute
</code></pre>

<p>My question is, how do you set a boolean attribute such as 'checked' on a checkbox or 'multiple' on a select tag?</p>

<p>I've tried doing the following without success:</p>

<pre><code>$('#element').attr('attribute', true)
$('#element').attr('attribute', '')
</code></pre>

<p>All of these add the attribute but usually like this </p>
