File tree Expand file tree Collapse file tree 5 files changed +15
-17
lines changed Expand file tree Collapse file tree 5 files changed +15
-17
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # BUILD minified JavaScript
3
+ # requires uglifyjs
4
+ #
5
+
6
+ autocomplete :
7
+ uglifyjs -nc ./src/jquery.autocomplete.js > ./src/jquery.autocomplete.min.js
Original file line number Diff line number Diff line change 12
12
$ ( function ( ) {
13
13
14
14
$ ( "#ac1" ) . autocomplete ( 'search.php' , {
15
+ minChars : 3 ,
16
+ mustMatch : true ,
15
17
selectFirst : true
16
18
} ) ;
17
19
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " autocomplete" ,
3
- "version" : " 3 .0.0" ,
3
+ "version" : " 2 .0.0" ,
4
4
"title" : " jQuery Autocomplete" ,
5
5
"author" : {
6
6
"name" : " Dylan Verheul" ,
Original file line number Diff line number Diff line change 494
494
$ . Autocompleter . prototype . activateNow = function ( ) {
495
495
var value = this . beforeUseConverter ( this . dom . $elem . val ( ) ) ;
496
496
if ( value !== this . lastProcessedValue_ && value !== this . lastSelectedValue_ ) {
497
+ this . active_ = true ;
497
498
this . lastProcessedValue_ = value ;
498
499
if ( value . length >= this . options . minChars ) {
499
500
this . fetchData ( value ) ;
500
- } else {
501
- this . finish ( ) ;
502
501
}
503
502
}
504
503
} ;
784
783
if ( this . autoFill ( first , filter ) || this . options . selectFirst || ( this . options . selectOnly && numResults === 1 ) ) {
785
784
this . focusItem ( $first ) ;
786
785
}
787
- this . active_ = true ;
788
786
} ;
789
787
790
788
$ . Autocompleter . prototype . showResult = function ( value , data ) {
896
894
this . callHook ( 'onNoMatch' ) ;
897
895
}
898
896
this . dom . $results . hide ( ) ;
899
- this . lastKeyPressed_ = null ;
900
- this . lastProcessedValue_ = null ;
901
897
if ( this . active_ ) {
902
898
this . callHook ( 'onFinish' ) ;
903
899
}
900
+ this . lastKeyPressed_ = null ;
901
+ this . lastProcessedValue_ = null ;
902
+ this . lastSelectedValue_ = null ;
904
903
this . active_ = false ;
905
904
} ;
906
905
You can’t perform that action at this time.
0 commit comments