Jquery 如何使用CakePHP中的fadeIn和fadeOut效应来处理更改事件?
我使用jshelper(jquery)在父下拉列表中用“更改”事件填充下拉列表。 这很好用。 效果淡出和淡出不起作用。 我对效果感到困惑。 这是“父项和子项”下拉列表Jquery 如何使用CakePHP中的fadeIn和fadeOut效应来处理更改事件?,jquery,cakephp,cakephp-2.6,Jquery,Cakephp,Cakephp 2.6,我使用jshelper(jquery)在父下拉列表中用“更改”事件填充下拉列表。 这很好用。 效果淡出和淡出不起作用。 我对效果感到困惑。 这是“父项和子项”下拉列表 <div class="form-group"> <label class="h5">Category</label> <div class="a
<div class="form-group">
<label class="h5">Category</label>
<div class="advance-search-form-control">
<?php echo $this->Form->input('catagory',array(
'class' => 'form-control',
'options'=>$catagory,
'div' => false,
'label' => false,
'type' =>'select',
'empty' =>'--select--',
'id' => 'catagory',
)); ?>
</div>
</div>
<div class="form-group">
<label class="h5" id="c_label" hidden>Subcatagory</label>
<div id="c_show" hidden>
<div class="advance-search-form-control">
<?php echo $this->Form->input('subcatagory',
array('class'=>'user_login form-control',
'id'=>'subcatagory',
'div'=>false,
'label'=>false,
'type' => 'select',
));
?>
</div>
</div>
</div>
类别
副词
下面是用于触发事件和显示效果的jquery(JsHelper)代码
<?php
$this->Js->get('#catagory')->event('change',
$this->Js->request(array(
'controller'=>'subcatagories',
'action'=>'getByCat'
), array(
'update'=>'#subcatagory',
'async' => true,
'method' => 'post',
'dataExpression'=>true,
'data'=> $this->Js->serializeForm(array(
'isForm' => true,
'inline' => true,
'before' => $this->Js->get('#wait')->effect('fadeOut', array('buffer' => false)),
'success' => $this->Js->get('#wait')->effect('fadeIn', array('buffer' => false))
))
))
和简单div:
<div id="wait" style="display: none">wait...</div>
等等。。。
有什么帮助吗?提前谢谢