betamos/Better-Autocomplete — Issue #17: Feature reqest : Add a callback in redraw.
Author: bratanon
Created: 2011-10-30 23:13:53+00:00
State: open

There would be good with a callback executed after the result element is .show() and .hide().

I.E

```javascript
// Finally show/hide based on focus and emptiness
if (($input.is(':focus') || focus) && !$results.is(':empty')) {
$results.filter(':hidden').show() // Show if hidden
.scrollTop($results.data('scroll-top')); // Reset the lost scrolling
AFTERSHOW CALLBACK HERE
}
else if ($results.is(':visible')) {
// Store the scrolling position for later
$results.data('scroll-top', $results.scrollTop())
.hide(); // Hiding it resets it's scrollTop
AFTERHIDE CALLBACK HERE
}
```