Hi @charles9
I’m afraid I couldn’t reproduce the issue on my end. Would it be possible for you to create a screen recording of it?
If you want the script to be executed after the fields are loaded, I believe you can change this line:
$(document).ready(function(){
To this one:
acf.add_action('load', function( $el ){
This page should give you more idea about it: https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/. You can also try to use acf/input/admin_footer
instead of acf/input/admin_head
.
Thanks 🙂