Can't catch radio input on click event

eCommerce WordPress theme to create online shop with WooCommerce support
GK User
Sun Dec 13, 2015 10:50 pm
Hi,

I am trying to add some jquery coding to the checkout page of this theme, but i am failing to catch an event.
when i use this code
Code: Select all
$('#billing_last_name').click(function(){

   alert($('input:radio[name=shipping_method]:checked').val());
});

i can get the value of the checked radio input.

But i just can't catch the click or change event of this radio input.
Code: Select all
$( "input:radio[name=shipping_method]" ).click(function() {
  alert( "Handler for .click() called." );
});


Actually, i can't catch anyevent on anything within the table tags in the shipping and paiement code.
Is it because it is on another php file?
Thank you for any clues, i have been trying for many days to make it work without success.
User avatar
Fresh Boarder

GK User
Mon Dec 14, 2015 10:08 am
Hi,
We didn't change anything in the checkout page - so it's a default WooCommerce code and you should ask WooCommerce support, could you please switch to any default WordPress theme like Twenty Fifteen and check again?

Do you have any errors in your js console?
User avatar
Moderator


cron