UNPKG

jquery-typeahead

Version:

jQuery plugin that provides Typeahead (autocomplete) Search preview from Json object(s) via same domain Ajax request or cross domain Jsonp and offers data compression inside Local Storage. The plugin is built with a lot of options and callbacks to allow c

155 lines (129 loc) 2.69 kB
.header { height: 50px; background: #f8f8f8; } .main-container { margin-left: 250px; background: #fff; padding: 10px; } .nav-wrapper { position: absolute; left: 0; z-index: 1; width: 250px; height: calc(100% - 50px); background: #3a3633; overflow: hidden; } .nav-wrapper .typeahead__container { padding: 10px } .nav-wrapper .typeahead__container .typeahead__field input { border-width: 0 0 1px 0; border-color: #555; background: transparent; color: #c0bbb7; outline: none; } .typeahead__container .fa-search { color: #999; position: absolute; right: 10px; top: 10px; } .typeahead__container.hasText .fa-search { cursor: pointer; } .typeahead__container.hasText .fa-search:before { content: "\f00d"; } .typeahead__container.hasText .fa-search:hover { color: #fff; } .nav-container { z-index: 1; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); width: 100%; transform: translateZ(0); -webkit-touch-callout: none; user-select: none; text-size-adjust: none; } .nav-container ul { list-style: none; padding: 0; margin: 0; width: 100%; text-align: left; } .nav-container a { cursor: pointer; text-decoration: none; padding: 10px; color: #c0bbb7; display: block; line-height: normal; } .nav-container a:hover { color: #fff; } .sub-nav { display: none; background: rgba(69, 69, 69, 0.6); padding: 7px 0; position: relative; } .sub-nav > li:before { content: ""; display: block; position: absolute; width: 8px; left: 23px; top: 16px; border-top: 1px solid #7A7A7A; z-index: 1; } .sub-nav a { padding-left: 42px; padding-top: 7px; padding-bottom: 7px; } .sub-nav a:hover { background-color: rgba(69, 69, 69, 0.8); } .sub-nav a:active { background: #616161; } .sub-nav:before { content: ""; display: block; position: absolute; z-index: 1; left: 23px; top: 0; bottom: 0; border-left: 1px solid #7A7A7A; } .main-nav li { position: relative; } .main-nav li .fa-chevron-left { margin-top: 5px; font-size: .75rem; } .main-nav li.open .sub-nav { display: block; } .main-nav li.open .fa-chevron-left:before { content: "\f078"; } .main-nav li.open:hover .sub-nav:before { border-color: #ACACAC !important; } .main-nav li.open:hover .sub-nav > li:before { border-color: #ACACAC !important; } i.fa { margin-right: 0.5rem; }