Support

Home Forums Event Espresso Premium Change order of countries in dropdown

Change order of countries in dropdown

Posted: October 1, 2018 at 2:08 pm

Viewing 1 reply thread


Peyton Earey

October 1, 2018 at 2:08 pm

On another thread I see how you can change the order of the countries in the dropdown but I’m having an issue where it only works on a refresh. If I go through the sequence without a refresh, it doesn’t take effect. I’ve tried both of these and looking for perhaps another solution?


(function($) {
    $(function(){
      $('#paypal-pro-billing-form-country>option[value=US]').insertBefore('#paypal-pro-billing-form-country>option[value=CA]');
    });
}(jQuery));

and


jQuery(document).ready(function ($) {
$('#paypal-pro-billing-form-country>option[value=US]').insertBefore('#paypal-pro-billing-form-country>option[value=CA]');
});

I’ve also tried Window.load


Josh

  • Support Staff

October 1, 2018 at 4:21 pm

The other topic was probably about changing the order on the first step of single page checkout. Since you’re looking to change the order of countries on a billing form, you’ll probably need to use an event handler on Ajax.complete e.g.
jQuery( document ).ajaxComplete( function() { ... });

Viewing 1 reply thread

The support post ‘Change order of countries in dropdown’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso