Zrub基金会的下拉按钮,里面的角部分断裂基金会、按钮、里面、部分

2023-09-13 03:45:03 作者:孤酒难如喉

当我使用Zrub基金会的下拉按钮内的角部分,他们在看第一眼OK,但却当您单击显示的选择,它们不会显示。悬停在钮的颜色,然后单击改变,因为他们应该,它只是列表项不显示。

有在控制台没有错误。另外,如果我直接把按钮code index.html中,下拉行为正常工作。

如何让内部部分的下拉按钮的工作任何想法?

app.js

 使用严格的;angular.module('的myapp',['myappFilters','myappServices'])。  配置(['$ routeProvider',函数($ routeProvider){  $ routeProvider。      当('/测试',{templateUrl:'谐音/ test.html的',控制器:EnvListCtrl})。}]); 
小米手机桌面联系人不小心弄没了 怎样让这个图标显示出来,里面的电话号码还是在手机的

的test.html

 < D​​IV HREF =#类=中的下拉按钮,全宽>  下拉按钮&放大器; NBSP;  < UL>    <立GT;< A HREF =#>选择1< / A>< /李>    <李班=分水岭>< /李>    <立GT;< A HREF =#>选择2'; / A>< /李>    <立GT;< A HREF =#>选择3'; / A>< /李>  < / UL>< / DIV> 

解决方案

我的解决方法是触发更改 select元素,然后点击的锚和列表元素。

这基本上初始化下拉元件与考虑到任何被设定为所选择的元件正确显示。

我有一个显示模式,这里面的部分里面的下拉列表。就我而言,我在激活模式之前初始化的元素。

标记

<选择风格=显示:无; ID =customDropdown  NG-选项=o.label为o在apptStatusOptsNG模型=apptStatus>< /选择>< D​​IV CLASS =自定义下拉菜单>  < A HREF =#级=当前>预约状态和LT; / A>  &所述; A HREF =#类=选择器>&下; / A>  < UL>    <李NG重复=o在apptStatusOpts> {{o.label}}< /李>  < / UL>< / DIV>

JavaScript的

$(#customDropdown)的触发器(变化)。$(#customDropdown a.current)触发('点击');$(#customDropdown li.selected)的触发器(点击)。

另外请注意,基金会3是我与合作。不知道如果有什么改变在近期发布基金4呢。

When I use Zrub Foundation drop down buttons inside an Angular partial, they look OK at first glance, but but when you click to display the choices, they are not displayed. The color of the botton on hover and click change as they should, it's just the list items do not display.

There are no errors in the console. Also, if I put the button code directly in index.html, the drop down behavior works fine.

Any ideas on how to get the dropdown button working inside a partial?

app.js

'use strict';
angular.module('myapp', ['myappFilters', 'myappServices']).
  config(['$routeProvider', function($routeProvider) {
  $routeProvider.
      when('/test', {templateUrl: 'partials/test.html',   controller: EnvListCtrl}).
}]);

test.html

<div href="#" class="medium button dropdown full-width">
  Dropdown Button &nbsp;
  <ul>
    <li><a href="#">Choice 1</a></li>
    <li class="divider"></li>
    <li><a href="#">Choice 2</a></li>
    <li><a href="#">Choice 3</a></li>
  </ul>
</div>

解决方案

My work-around was to trigger change on the select element, and then click on the anchor and list elements.

This essentially initializes the dropdown element to display properly with consideration to whatever is set as the selected element.

I have the dropdown inside a reveal modal, which is inside a partial. In my case, I initialize the element before activating the modal.

markup

<select style="display:none;" id="customDropdown" 
  ng-options="o.label for o in apptStatusOpts" ng-model="apptStatus"></select>

<div class="custom dropdown">
  <a href="#" class="current">Appointment Status</a>
  <a href="#" class="selector"></a>
  <ul>
    <li ng-repeat="o in apptStatusOpts">{{o.label}}</li>
  </ul>
</div>

javascript

$("#customDropdown").trigger('change');
$("#customDropdown a.current").trigger('click');
$("#customDropdown li.selected").trigger('click');

Also note, Foundation 3 is what I was working with. not sure if anything changed in the recently release Foundation 4 yet.