我在这里www.example.com的Option no 3https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview添加多选下拉菜单到我的Yii项目上。但是它显示,
jquery.js:6920未捕获的类型错误:jQuery.easing[this.easing]不是位于www.example.com上的函数init.run(jquery.js:6920)
在我的cgridview上,这是必须多选复选框的列,
array (
'name'=>'brand_id',
'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
'model' => $model,
'dropDownAttribute' => 'brand_id',
'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
),
true // capture output; needed so the widget displays inside the grid
),
),
在我的设计图上,
我已经包含了jquery,
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
下拉式页面:
因为jQuery.easing [this.easing]不是函数错误,所以多选功能不起作用,按照下面的建议:https://stackoverflow.com/a/12592301/1138192我还添加了jquery UI,但即使它破坏了现有的下拉菜单,它也不工作。
控制台错误:
1条答案
按热度按时间cclgggtu1#
问题出在
jquery.multiselect.js
(EchMultiSelect-v1.3)中,因为效果方法参数是inverted(至少对于当前的jQuery版本是这样):第566、573、600行上的
.show( effect, speed )
和.hide( effect, speed )
应该被正确的顺序.show( speed, effect )
和.hide( speed, effect )
替换。