corejavascript / corejavascript/typeahead.js

append to body mode

Open
#116 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
968
Forks
231
PR merge metrics
No merged PRs in 30d

Description

If the search field is within an overflow element (like `

`), you can already append the suggestion menu to another DOM element.
```javascript
$('.typeahead').typeahead({
// ...
menu: $('div-on-body')
}, /* dataset */);
```
In order to position the suggestion menu under the search field, you must do the calculations for top, left and width by yourself.

Wouldn't it be great if there is an "append-to-body" mode that makes these calculations for you?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.