bootstrap amazon style search bar

前端 未结 2 1231
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 16:54

Is there an easy way to do something similar to this in bootstrap? A search bar with a drop down selector for a different category? I\'ve been looking through their documentatio

2条回答
  •  别那么骄傲
    2021-02-04 17:06

    Please, refer this it satisfied your requirement HTML:

    
    

    CSS:

    body{
        margin-top:20px;
    }
    

    JS:

    $(document).ready(function(e){
        $('.search-panel .dropdown-menu').find('a').click(function(e) {
            e.preventDefault();
            var param = $(this).attr("href").replace("#","");
            var concept = $(this).text();
            $('.search-panel span#search_concept').text(concept);
            $('.input-group #search_param').val(param);
        });
    });
    

    Refer this link http://bootsnipp.com/snippets/featured/search-panel-with-filters

提交回复
热议问题