Checkout Page | Display Console Log while Selecting 'State/Territory' option

Kit_
Tourist
7 0 3

Hi Developer,

I am trying to displaying the console log while selecting dropdown 'State/Territory' option as below screenshot:

Kit__0-1635313933550.png

Below is my javascript code for displaying console log message but somehow it is not working:

 

 

document.querySelector('#checkout_shipping_address_province').addEventListener('change', function(e) {
    e.preventDefault();
    console.log('select box');
})

 

 

 

I would really appreciate if you could help me have a console log message whenever the dropdown menu gets changed.

 

Thank you

Replies 0 (0)