using jquery autocomplete in wordpress plugin

Auto complete is most likely not working on the extra fields because they are added with javascript dynamically, and when you make your javascript .autocomplete() call, it runs on page load. Your dynamically created fields do not exist yet to have autocomplete hooked with them. Try this. jQuery(document).on(“keydown”, “.post_email_repeatable”, function(){ jQuery(this).autocomplete({ source: “get_posts.php”, minLength: 1 … Read more

jQuery dialog prints HTML-Tags under WordPress

It’s sort of a longshot, but maybe try something like this: $(‘#button-setup-league’).click(function() { $( “#dialog p” ).html(‘<span>’+wpslm_v_script_vars.delete_league+'</span>’); $( “#dialog” ).dialog({ modal: true }); }); This, of course, requires “#dialog p” to be initially empty, or assumes that its contents can be replaced entirely. If not, maybe you can use the solution above but with a … Read more

How can I disable sorting/dragging of a menu item in the custom menu admin?

The following does the trick: add_action( ‘admin_footer-nav-menus.php’, ‘block_sortables_wpse_90610’ ); function block_sortables_wpse_90610() { ?> <script type=”text/javascript”> jQuery(document).ready(function($) { $(“”).sortable({ disabled: false }); }); </script> <?php } This also works: sortable(false). Docs: