Created
May 4, 2016 15:35
-
-
Save joshfeck/c95b0a163c3d9c2c37c8e4d6efa47dcb to your computer and use it in GitHub Desktop.
Move the Australia state <optgroup> before the one for New Zealand https://eventespresso.com/topic/change-order-of-stateprovinces-optgroups-on-registration-forms/#post-201209
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_move_australia_before_nz() { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
var aussie = '.ee-reg-qstn-state optgroup[label="Australia"]'; | |
var kiwi = '.ee-reg-qstn-state optgroup[label="New Zealand"]'; | |
$(aussie).insertBefore(kiwi); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'AHEE__EE_Form_Section_Proper__localize_script_for_all_forms__begin', 'my_move_australia_before_nz' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment