how to know whether an element has an class

来源:互联网 发布:编程今有雉兔同笼 编辑:程序博客网 时间:2024/05/16 13:38
         use the function hasClass to know whether an element has an class
      example:
                //store state in cookie
                if(li.hasClass(CLASSES.open)){
                    TreeState = false;
                }else{
                    TreeState = true;
                }
                
原创粉丝点击