Sequence of Events, alert is faster then removeAttr
<p>i got following problem, i need to build a two checkboxes; where only one can be selected at a time, but onchange there will be a live calculation.</p>

<pre><code>$('#calculator input, #calculator select').change(function() {
    $('#calc_keller_true').click(function() {
        $('#calc_keller_false').removeAttr('checked');
    });
    $('#calc_keller_false').click(function() {
        $('#calc_keller_true').removeAttr('checked');
    });
    liveCalculate();
});
</code></pre>

<p>This is how it looks like, which is working but it seems to slow cause in my function liveCalculate i do this.</p>

<pre><code>function liveCalculate() {
    // Getting the value of the checked checkbox
    var calc_keller = $('input[name=calc_keller]:checked').val();
    alert(calc_keller);
}
</code></pre>

<p>So when i click on the false button the alert will trigger before my removeAttr and both Checkboxes will be 'checked' at the moment of the alert.</p>

<p>Anyone got a plan why exactly the liveCalculate function triggers faster then the removeAttr ?</p>

<p>Do i miss some basic knowledge in how the order works in javascript ?</p>

<p>Best Regards,
jay7</p>
