Closed uranusAdam closed 11 years ago
The problem has been solved. isLast: function() { var current_parent_id = $(this).treegrid('getParentNodeId'); if ($(this).next().length>0) { if ($(this).next().treegrid('getParentNodeId') === current_parent_id) { return false; } else { return true; } } else { return true; } },
Thanks for you help! Now you can use
$('.tree').treegrid('getAllNodes').each(function() {
if ($(this).treegrid("isLast")) {
$(this).find('.treegrid-expander').css("background","red");
}
});
or
$('.tree').find('tr').each(function() {
if ($(this).treegrid("isNode") && $(this).treegrid("isLast")) {
$(this).find('.treegrid-expander').css("background","red");
}
});
$('.tree').find('tr').each(function(){ if ($(this).treegrid('isLast')){ $(this).find('.treegrid-expander').css("background","red"); } }); Here's my code; And this is the error from firebug TypeError: $(...).treegrid(...) is undefined