Hi, I have a html like this
<input type="checkbox" id="priority" /><span class="presult">0 USD</ span> I want when checkbox is checked, the span will have 500 USD. When checkbox is unchecked the span will return 0 USD. This is what I've got, have no idea why not work. if ($('#priority').is(':checked')) { $('.presult').text('500 USD'); }else { $('.presult').text(''); }