Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 使div slideDown()而其他内容fadeIn()变为_Jquery - Fatal编程技术网

Jquery 使div slideDown()而其他内容fadeIn()变为

Jquery 使div slideDown()而其他内容fadeIn()变为,jquery,Jquery,根据下拉菜单中的选择,如何使代码中的div在其他内容淡入时平滑地向下滑动,然后在其他内容淡出时平滑地向上滑动 $(“选择[name='monthSelect']”)prop('disabled',true); $(“选择[name='catFrequency'])。更改(函数(){ var jSelect1=$(“选择[name='monthSelect']”); if(jSelect1.prop('disabled')){ jSelect1.removeAttr('disabled'); $

根据下拉菜单中的选择,如何使代码中的div在其他内容淡入时平滑地向下滑动,然后在其他内容淡出时平滑地向上滑动

$(“选择[name='monthSelect']”)prop('disabled',true);
$(“选择[name='catFrequency'])。更改(函数(){
var jSelect1=$(“选择[name='monthSelect']”);
if(jSelect1.prop('disabled')){
jSelect1.removeAttr('disabled');
$('#recurBegin')。查找(“选项[value=''”)。删除();
$('#recurEnd')。查找(“选项[value=''”)。删除();
$('#recurEnd').find(“option[value='12']).prop('selected',true);
}否则{
jSelect1.prop('disabled',true);
$(“#recurBegin”)。前缀(“”);
$(“#recurEnd”)。前缀(“”);
}
});
var end=$(“#recurEnd”);
$('#recurBegin')。更改(函数(){
如果(this.value==12){
完.val(12);;
end.prop('禁用',true);
}否则{
var index=$(this).find('option:selected').index();
结束。道具('禁用',错误);
end.find('option').show();
find('option:lt(+(index+1)+')).hide();
end.find('option:eq(+++index++')).prop('selected',true);
}
});

Jquery:

$("#select").change(function () {

if($(this).val() == 0)
{
    $('.subHeader').fadeOut(500);
    $('#annual').hide('slow');        
}
else
{
    $('.subHeader').fadeIn(500);
    $('#annual').show('slow');
}

});
.hide {
    display:none;
}
CSS:

$("#select").change(function () {

if($(this).val() == 0)
{
    $('.subHeader').fadeOut(500);
    $('#annual').hide('slow');        
}
else
{
    $('.subHeader').fadeIn(500);
    $('#annual').show('slow');
}

});
.hide {
    display:none;
}

这在演示中起作用,但在我的实际项目中不起作用……我可以从哪里着手调查原因呢?我在脚本标记的页脚后面有代码。@user1476992我忘了告诉你,看看那个演示中的css。是的,我确实看到你更改了css。我的代码中肯定有问题。奇怪的是,我已经有了一个有效的脚本,我只是想让它更流畅,所以奇怪的是你的脚本不起作用。我想我以后再谈吧。谢谢你的帮助!