Autocomplete Without jQuery UI

后端 未结 8 941
野性不改
野性不改 2021-02-04 01:52

I\'m using jQuery in my project and I need to implement autocomplete, but I\'d like to avoid including jQuery UI widget, and hopefully use some specific external plugin. Could y

8条回答
  •  北海茫月
    2021-02-04 02:22

    You can use the Ajax Autocomplete for jQuery plugin

    And here is the full documentation

    Code

    SCRIPT

    
    
    
    

    CSS

    .text-field {
        -moz-box-sizing: border-box;
        border: 1px solid #EEEEEE;
        font-family: "Source Sans Pro",Arial,sans-serif;
        font-size: 0.73684em;
        font-weight: 600;
        height: 37px;
        margin: 0;
        padding: 5px;
        width: 100%;
    }
    .autocomplete-suggestion {
        overflow: hidden;
        padding: 2px 5px;
        white-space: nowrap;
    }
    .autocomplete-suggestions strong {
        color: #3399FF;
        font-weight: normal;
    }
    .autocomplete-selected{
      background:#F0F0F0;
    }
    

    HTML

     
    

    I created a demo of autocomplete here is the link jsbin.com

提交回复
热议问题