Converting to 2 decimal places
Use .toFixed( ) for this. Example: var compliance_fee = 20; taxreturn_fee.value = ((compliance_fee.value * 34)/100).toFixed(2); Jquery Tips Check if checkbox is checked jQuery provides us 3 ways to determine if a checkbox is checked. 1. // First way 2. $('#checkBox').attr('checked'); 3. 4. // Second way 5. $('#edit-checkbox-id').is(':checked'); 6. 7. // Third way 8. $("[:checkbox]:checked").each( 9. function() { 10. // Insert code here 11. } 12. ); How to disabled/enable an element with jQuery 1. // To disable 2. $('.someElement').attr('disabled', 'disabled'); 3. 4. // To enable 5. $('.someElement').removeAttr('disabled'); 6. // OR you can set attr to "" 7. $('.someElement').attr('disabled', ''); Disable right click Some of us might want to disable right click, or want to create our ow...