|
|
@ -126,7 +126,9 @@ $.fn.search = function(parameters) { |
|
|
|
module.set.focus(); |
|
|
|
if( module.has.minimumCharacters() ) { |
|
|
|
module.query(); |
|
|
|
module.showResults(); |
|
|
|
if( module.can.show() ) { |
|
|
|
module.showResults(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
blur: function(event) { |
|
|
@ -288,6 +290,9 @@ $.fn.search = function(parameters) { |
|
|
|
useAPI: function() { |
|
|
|
return $.fn.api !== undefined; |
|
|
|
}, |
|
|
|
show: function() { |
|
|
|
return !module.is.visible() && module.is.focused() && !module.is.empty(); |
|
|
|
}, |
|
|
|
transition: function() { |
|
|
|
return settings.transition && $.fn.transition !== undefined && $module.transition('is supported'); |
|
|
|
} |
|
|
@ -752,32 +757,32 @@ $.fn.search = function(parameters) { |
|
|
|
$results |
|
|
|
.html(html) |
|
|
|
; |
|
|
|
module.showResults(); |
|
|
|
if( module.can.show() ) { |
|
|
|
module.showResults(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
showResults: function() { |
|
|
|
if( !module.is.visible() && module.is.focused() && !module.is.empty() ) { |
|
|
|
if( module.can.transition() ) { |
|
|
|
module.debug('Showing results with css animations'); |
|
|
|
$results |
|
|
|
.transition({ |
|
|
|
animation : settings.transition + ' in', |
|
|
|
debug : settings.debug, |
|
|
|
verbose : settings.verbose, |
|
|
|
duration : settings.duration, |
|
|
|
queue : true |
|
|
|
}) |
|
|
|
; |
|
|
|
} |
|
|
|
else { |
|
|
|
module.debug('Showing results with javascript'); |
|
|
|
$results |
|
|
|
.stop() |
|
|
|
.fadeIn(settings.duration, settings.easing) |
|
|
|
; |
|
|
|
} |
|
|
|
settings.onResultsOpen.call($results); |
|
|
|
if( module.can.transition() ) { |
|
|
|
module.debug('Showing results with css animations'); |
|
|
|
$results |
|
|
|
.transition({ |
|
|
|
animation : settings.transition + ' in', |
|
|
|
debug : settings.debug, |
|
|
|
verbose : settings.verbose, |
|
|
|
duration : settings.duration, |
|
|
|
queue : true |
|
|
|
}) |
|
|
|
; |
|
|
|
} |
|
|
|
else { |
|
|
|
module.debug('Showing results with javascript'); |
|
|
|
$results |
|
|
|
.stop() |
|
|
|
.fadeIn(settings.duration, settings.easing) |
|
|
|
; |
|
|
|
} |
|
|
|
settings.onResultsOpen.call($results); |
|
|
|
}, |
|
|
|
hideResults: function() { |
|
|
|
if( module.is.visible() ) { |
|
|
|