If you want to check if a specific class exists then:
if(!$("ul").hasClass("class-name")){
$("ul").addClass("bbox");
}
If you want to check if any class exists:
if ($('ul').attr('class') == '') {
$("ul").addClass("bbox");
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…