jquery autocomplete not working

前端 未结 3 2054
你的背包
你的背包 2021-02-07 10:16

Could someone please tell me why my code for the jquery autocomplete is not working?

Here is my javascript code.



        
3条回答
  •  迷失自我
    2021-02-07 11:20

    Warning: This is an old answer to an old question dating back to 2011. You should be advised to use a more recent release of jQuery and check the API reference for guidance.

    The problem you're having is that you are using the jQuery Autocomplete plugin but you're calling it the way you would call the jQuery UI autocomplete.

    If you'd use the jQuery UI Autocomplete, the code itself works fine as you can see in this fiddle. If you use the the autocomplete plugin, you've to change the call to

    $("#seed_one").autocomplete(data);
    

    Suggestions:

    1. Use autocomplete in jQuery UI instead of the autocomplete plugin. The latter is deprecated.
    2. Fix http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js , this couldn't be access at this time

    Complete code for jQuery UI

    
    
        
        
        
    
    
    
        
    
    
    

    Complete code for Autocomplete plugin:

    
    
        
        
        
    
    
    
        
    
    
    

提交回复
热议问题