2014-05-09 80 views

回答

0

使用jQuery,你可以尝试这样的事:

if ($('#child').length) { 
    // manipulate the parent 
    $('#parent').addClass('dhx_view'); 
} 

$('#child').length将评估为false如果没有孩子的div s为存在。

相关问题