Enabling a button based on condition with jQuery
<p>I have a "Save Settings" button which is of type 'image'.
I want it to be enabled only after a checkbox is checked by the user
I m using..</p>

<pre><code>$('#btnSaveProfile').attr("disabled",true);    
$('#btnSaveProfile').click(function(){
            if ($("#rdAccept").is(':checked')) 
            {
                $('#btnSaveProfile').attr("disabled",false);
                updateProfile();// calling a function here that saves data.
            }
        });
</code></pre>

<p>This does not work, any inputs....please</p>
