"Typeahead - No results found"
Bootstrap 3.0.0 Snippet by dasago78

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <script src="http://twitter.github.io/typeahead.js/releases/latest/typeahead.js"></script> <link rel="stylesheet" href="http://twitter.github.io/typeahead.js/css/examples.css"> <div class="container"> <div class="row"> <div class="col-xs-12"> <input class="typeahead" id="srch-term" type="text" placeholder="Search" /> </div> </div> <div class="row"> <div class="col-xs-12 text-center"> <div id="noresults"><h4><strong>No results</strong></h4></div> </div> </div> </div>
#noresults{ width:396px; display:none; margin: auto; text-align:left; margin-top: 12px; padding: 0px 8px; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); box-shadow: 0 5px 10px rgba(0,0,0,.2); }
$(document).ready(function(){ $('#srch-term').typeahead( { name: 'climbs', local: ["Alpe d´Huez", "Mont Ventoux", "Col du Galibier", "Mortirolo", "Col de Restefond", "Col du Tourmalet", "Col du Glandon", "Col de la Madeleine", "Col de l´Iseran", "Angliru", "Tibidabo", "Pico Veleta", "Prada Alta", "Monte Zoncolan", "Rifugio Baita Zabo", "Prato Maslino", "Etna", "Col du Grand Colombier", "Col de Joux Plane", "Plateau de Beille", "Col de la Croix de Fer", "Col de Peyresourde", "Col du Télégraphe", "Col de l´Aubisque", "Luz Ardiden", "Col de la Colombière", "Col de la Bonette", "Les Deux Alpes", "Col de l´Aspin", "Col du Soulor", "Avoriaz", "Col de Sarenne", "Cormet de Roselend", "Col de Val-Louron", "Col de Pailhères", "L´Albiol", "Peña Cabarga", "Alto de Aitana", "Alt de Montserrat", "Cuitu Negru", "Lagos de Covadonga", "La Cobertoria", "Coll del Farell", "Santuario de Urkiola", "La Mussara", "Mont Caro", "Coll de la Teixeta", "Castell d´Escornalbou", "Coll d´Alforja"], } ); $('#srch-term').keyup(function () { if (($('#srch-term').val()).length >= 1) { if (($('.tt-dropdown-menu').css("display") == 'none')) { $('#noresults').show(); } else { $('#noresults').hide(); } } }); });

Questions / Comments:

Related: See More