下拉网格和列表视图

时间:2017-08-28 14:20:02

标签: jquery html

我需要一些帮助。我最近进行了一次设计更改,从简单的切换到将网格和列表视图选项放在下拉列表中。我现在有点卡在如何编辑我的东西,甚至开发一种新的处理方式。单击后,我需要帮助让所选项目填充按钮。我有网格列表视图工作得很好。我刚刚失去了如何实现这一下拉菜单并可以使用一些帮助。这是我目前的HTML代码:

enter image description here

enter image description here

HTML:

 <div class="list-view col-sm-3 col-xs-3">
      <button class="btn btn-primary dropdown-toggle toggle-view" data-toggle="dropdown"><span class="icon-icon-grid-view"></span>&nbsp;Grid <span class="hidden-txt hidden-xs">&nbsp;View</span></button>
      <div class="dropdown-menu">
        <a href="#" id="grid" class="btn btn-sm grid-view-btn btn-sm-toggle form-control active"><span class="icon-icon-grid-view"></span>&nbsp;Grid <span class="hidden-txt hidden-xs">&nbsp;View</span><span class="down-icon icon-icon-down-arrow visible-xs"></span></a>
        <a href="#" id="list" class="btn btn-sm list-view-btn btn-sm-toggle form-control"><span class="icon-icon-list-view"></span>&nbsp;List <span class="hidden-txt hidden-xs">&nbsp;View</span><span class="down-icon icon-icon-down-arrow visible-xs"></span></a>
      </div>
    </div>

0 个答案:

没有答案