jq 判断是否含有元素

对于 jq 来讲 判断 是否 含有 元素 可使用 : 例子:this

/ 方案二
if ($(this).find('ul').length == 0) {
    // Code
}

若是 是 判断 classcode

if ( false== $("#agreement").hasClass("on")) {
}
相关文章
相关标签/搜索