zoukankan      html  css  js  c++  java
  • JQ判断div是否隐藏

     1. $("#tanchuBg").css("display")  
     2. $("#tanchuBg").is(":visible")  
     3. $("#tanchuBg").is(":hidden") 
     

    例:

    if($("#tanchuBg").is(":hidden"))  {

        alert("隐藏了")

    }

    if( $("#tanchuBg").css("display") == 'none' ){  
      
        /* your code here*/  
     
    else{  
      
        /*  alternate logic   */  

     if ($("#tanchuBg").css("visibility") == "hidden")  
        {  
            // handle non visible state  
        }  
        else  
        {  
            // handle visible state  
        } 

    if($("#tanchuBg").is(':visible')){  //如果node是显示的则隐藏node元素,否则显示

     

    }else{

     

    }

  • 相关阅读:
    io
    文件
    诚实
    没有犯错并不代表自己就是做得好
    脑力锻炼的随缘
    电路运算
    “容错率”
    GPU简介
    名与责任
    失眠和精神的思考
  • 原文地址:https://www.cnblogs.com/weimingxin/p/8952081.html
Copyright © 2011-2022 走看看