diff options
| author | Mark Otto <[email protected]> | 2017-07-09 20:14:24 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-07-09 20:14:24 -0700 |
| commit | c6652eb862cd0a9ac33f5cff4fa777324853466a (patch) | |
| tree | 6f967d8d079174ba5c1450e7752f42c67e77333d /_includes/scripts.html | |
| parent | 25062d3838afa289d7dc0c280583699f42bfdfde (diff) | |
| parent | 6436233a9c786d32990a5fbc0c7dcc9e1af8332b (diff) | |
| download | bootstrap-c6652eb862cd0a9ac33f5cff4fa777324853466a.tar.xz bootstrap-c6652eb862cd0a9ac33f5cff4fa777324853466a.zip | |
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
Diffstat (limited to '_includes/scripts.html')
| -rw-r--r-- | _includes/scripts.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/_includes/scripts.html b/_includes/scripts.html index bc411c226..da73fdd68 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -29,6 +29,12 @@ apiKey: '48cb48b22351bc71ea5f12f4d1ede198', indexName: 'bootstrap-v4', inputSelector: '#search-input', + handleSelected: function (input, event, suggestion) { + var url = suggestion.url; + url = suggestion.isLvl1 ? url.split('#')[0]: url; + // If it's a title we remove the anchor so it does not jump. + window.location.href = url; + }, transformData: function (hits) { return hits.map(function (hit) { hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '/docs/4.0'); |
