Using jQuery, how can I get the current class of a div called div1?
div1
if you want to look for a div that has more than 1 class try this:
Html:
Jquery: var check = $( "#myDiv" ).hasClass( "class2" ).toString(); ouput: true 0 讨论(0) 查看其它11个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Jquery:
var check = $( "#myDiv" ).hasClass( "class2" ).toString();
ouput:
true