html - Have to double click li to open my link -


i'm having trouble search box has dropdown. in dropdown there links open links have double click them. here link jsfiddle of https://jsfiddle.net/ag7l02u0/. have solution? html:

        <form class="search" method="post" action="" >                               <input type="text" name="inputsearch" id="inputsearch" placeholder="search username" autocomplete="off" />             <ul class="search-ac" id="user-result">                 <li><a href="#">search result #2<br /><span>description...</span></a></li>                 <li><a href="#">search result #3<br /><span>description...</span></a></li>                 <li><a href="#">search result #4</a></li>              </ul>              <input type="submit" name="search" id="search" style="display:none;">          </form> 

css:

.search {     position: relative;     width: 300px;     float: right;     margin-top:5px; } .search input {     height: 26px;     width: 100%;     padding: 5px 12px 0px 25px;     background: white url("../img/search.png") 8px 6px no-repeat;     border: 1px solid;     border-color: #a8acbc #babdcc #c0c3d2;     -webkit-appearance: textfield;     -webkit-box-sizing: border-box;     -moz-box-sizing: border-box;     box-sizing: border-box;     -webkit-box-shadow: inset 0 1px #e5e7ed, 0 1px #fcfcfc;     box-shadow: inset 0 1px #e5e7ed, 0 1px #fcfcfc; } .search input:focus {     outline: 0;     border-color: #66b1ee;     -webkit-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);     box-shadow: 0 0 2px rgba(85, 168, 236, 0.9); } .search input:focus + .search-ac {     display: block; }  .search-ac {     display: none;     position: absolute;     top: 35px;     left: 0;     right: 0;     z-index: 100;     background: #fdfdfd;     border: 1px solid;     border-color: #cbcfe2 #c8cee7 #c4c7d7;     border-radius: 3px;     background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);     background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);     background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);     background-image: linear-gradient(to bottom, #fdfdfd, #eceef4);     -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);     -webkit-padding-start: 0px; } .search-ac:hover {     display: block; } .search-ac li {     display: block;     z-index: 100000; } .search-ac li:first-child {     margin-top: -1px; } .search-ac li:first-child:before, .search-ac li:first-child:after {     content: '';     display: block;     width: 0;     height: 0;     position: absolute;     left: 50%;     margin-left: -5px;     border: 5px outset transparent; } .search-ac li:first-child:before {     border-bottom: 5px solid #c4c7d7;     top: -11px; } .search-ac li:first-child:after {     border-bottom: 5px solid #fdfdfd;     top: -10px; } .search-ac li:first-child:hover:before, .search-ac li:first-child:hover:after {     display: none; } .search-ac li:last-child {     margin-bottom: -1px; } .search-ac {     display: block;     position: relative;     margin: 0 -1px;     padding: 6px 40px 6px 10px;     color: #808394;     font-weight: 500;     text-decoration: none;     text-shadow: 0 1px white;     border: 1px solid transparent;     border-radius: 3px;     z-index:110; } .search-ac span {     font-weight: 200; } .search-ac a:before {     content: '';     position: absolute;     top: 50%;     right: 10px;     margin-top: -9px;     width: 18px;     height: 18px;     background: url("../img/arrow.png") 0 0 no-repeat; } .search-ac a:hover {     color: white;     text-shadow: 0 -1px rgba(0, 0, 0, 0.3);     background: #338cdf;     border-color: #2380dd #2179d5 #1a60aa;     background-image: -webkit-linear-gradient(top, #59aaf4, #338cdf);     background-image: -moz-linear-gradient(top, #59aaf4, #338cdf);     background-image: -o-linear-gradient(top, #59aaf4, #338cdf);     background-image: linear-gradient(to bottom, #59aaf4, #338cdf);     -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);     box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08); }  :-moz-placeholder {     color: #a7aabc;     font-weight: 200; }  ::-webkit-input-placeholder {     color: #a7aabc;     font-weight: 200;     line-height: 14px; }  ::-webkit-search-decoration, ::-webkit-search-cancel-button {     -webkit-appearance: none; }  .lt-ie9 .search input {     line-height: 26px; } .btn-default{     float:right;     margin-top: -38px; } 

have tried changing href attribute else "#"?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -