Support » Plugins » Hacks » jQuery Autocomplete Not Working in Chrome/Firefox

  • Hello,

    I’ve made use of the code at to add autocomplete to my WordPress search.

    (It’s based on the tutorial at:

    It works in Safari and does nothing in Chrome and Firefox.

    Unfortunately, I have limited knowledge of javascript. I’m assuming that the problem lies in the following code since, clearly, the backend is doing its job and I’m getting results in Safari.

    <script type="text/javascript">
    	jQuery(document).ready(function ($){
    		var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
            	var ajaxaction = '<?php echo self::$action ?>';
            	$("#secondary #searchform #s").autocomplete({
    			delay: 0,
    			minLength: 3,
    			source: function(req, response){
    				$.getJSON(ajaxurl+'?callback=?&action='+ajaxaction, req, response);
                		select: function(event, ui) {

    Anyone have an idea of what the problem is?

  • The topic ‘jQuery Autocomplete Not Working in Chrome/Firefox’ is closed to new replies.