2014-05-09 83 views

回答

0

使用jQuery,你可以嘗試這樣的事:

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

$('#child').length將評估爲false如果沒有孩子的div s爲存在。

相關問題