Using Bootstrap's typeahead from inside a modal window

How you can go about using Bootstrap's typeahead in a modal window

If you want to use Bootstrap’s typeahead functionality from inside a modal window such as lightbox or facebox then you are going to have to make a small edit to one of the bootstrap files.

Open up bootstrap-typeahead.js in your text editor of choice and then add a z-index of 9999, like so;

this.$menu.css({
  top: pos.top + pos.height,
  left: pos.left,
  'z-index': 9999
})

You don’t need to go as high as 9999 but it worked for me!

It took me way too long to get this working, other bootstrap things appear to work fine inside modals.

Recent posts View all

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.