Reputation: 61
Hello I'm using following for checked of radio button and remove class now I want to apply same for unchecked and addClass
what is changes is my following jQuery line for unchecked radio?
$("#address_show:checked").closest('.display_address').find('.ps-btn-show-address').removeClass('hide_address');
Upvotes: 1
Views: 29
Reputation: 6336
Try:
if ($("#address_show:not(:checked)") {
// Do what you want here.
}
Upvotes: 1