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

Cannot get jQuery to work in WordPress [duplicate]

@milo might have a point. WordPress loads jQuery in no-conflict mode. So this: $(document).ready(function(){ alert(‘ready’); }); becomes this: jQuery(document).ready(function(){ alert(‘ready’); }); if you want to use $ to not have to refactor your code just pass it to the function: jQuery(document).ready(function($){ $(‘.selector’).html(‘this will now work’); });

Uncaught TypeError: number is not a function [closed]

Try this: <script type=”text/javascript” charset=”utf8″> jQuery(function($){ $(‘img’).each( function() { var mySrc = $(this).attr( “src” ); $(this).wrap( ‘<a href=”‘+mySrc+'” class=”link”></a>’ ); }); }) </script>

jQuery color picker function on change

$(‘yourColorpickerselector’).wpColorPicker({ change: function(event, ui) { var form = $(this).closest(‘form’) form .trigger(‘change’) } }); within color picker default method “change”. you can trigger form change. or any other function, what you want to do. related link : wordpress discuss iris color picker