Don't shift the sibling tree when toggle sub tree

Sumh <42424861@qq.com>
master
Sumh 2012-02-04 16:33:00 +08:00
parent 7f04b1b6ee
commit ed4d5731f6
1 changed files with 4 additions and 3 deletions

View File

@ -152,14 +152,15 @@
$nodeDiv.click(function() { $nodeDiv.click(function() {
var $this = $(this); var $this = $(this);
var $tr = $this.closest("tr"); var $tr = $this.closest("tr");
$tr.nextAll("tr").fadeToggle("fast");
if($tr.hasClass('contracted')){ if($tr.hasClass('contracted')){
$this.css('cursor','n-resize'); $this.css('cursor','n-resize');
$tr.addClass('expanded'); $tr.removeClass('contracted').addClass('expanded');
$tr.nextAll("tr").css('visibility', '');
}else{ }else{
$this.css('cursor','s-resize'); $this.css('cursor','s-resize');
$tr.addClass('contracted'); $tr.removeClass('expanded').addClass('contracted');
$tr.nextAll("tr").css('visibility', 'hidden');
} }
}); });