显示隐藏的div不在IE中工作

时间:2013-10-12 10:47:36

标签: javascript jquery html internet-explorer

我使用下面的javascript添加\删除一些隐藏的div取决于用户选择。我看到代码在chrome和firefox中工作正常。但是在IE中虽然显示了隐藏的div,但它仍处于禁用状态。这里的问题是什么

PHP FIDDLE SETUP

function AddNewFa() 
{
var facount = parseInt($('#countfa').val(),9) ;
    if( facount < 10)
{
        facount = facount+1;
            for(i=3;i<10;i++)
                {
                    if( i<facount )
                    {
                        $('#fa'+i).slideDown("fast");
                        $('#fa-select-'+i).removeAttr("disabled");
                        }
                    else
                    {
                        $('#fa'+i).slideUp("fast");
                        $('#fa-select-'+i).attr("disabled","disabled");

                        }

                }
    $('#countfa').val(facount);  
}
CheckButtons()
} 


function RemoveNewFa() 
{
var facount = parseInt($('#countfa').val(),10) ;
    if( facount >3)
{
        facount = facount-1;
            for(i=3;i<10;i++)
                {
                    if( i<facount )
                    {
                        $('#fa'+i).slideDown("fast");
                        $('#fa-select-'+i).removeAttr("disabled");
                        }
                    else
                    {
                        $('#fa'+i).slideUp("fast");
                        $('#fa-select-'+i).attr("disabled","disabled");

}                       
                }
                $('#countfa').val(facount); 
            }   
CheckButtons()          
    }   

function CheckButtons() {
    var facount = parseInt($('#countfa').val(),9) ;
    if( facount >=9 )
    { $('#addfa').attr('disabled','disabled');} 
    if( facount >=4 )
    { $('#removefa').removeAttr("disabled");}
    if( facount <=3 )
    { $('#removefa').attr('disabled','disabled');} 
    if( facount <=8 )
    { $('#addfa').removeAttr("disabled");} 
}

$(document).ready(function() {CheckButtons();});

0 个答案:

没有答案