简体   繁体   中英

Radiobutton change event with jQuery doesn't fire

Here's a JSFiddle example so you see what I mean:

http://jsfiddle.net/stapiagutierrez/yVzR5/

The event is supposed to fire on the selection of the payment option change, but it's only firing when I specifically click on the radio button.

Any ideas?

You will need to trigger the event yourself

    $('.paymentoption').click(function () {
        $(this).find('input[name="paymenttype"]').prop('checked', true).change();

        // or trigger('change');
    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM