我使用jQuery來顯示錶TR爲以下TR 0可見,並且有一個鏈接: 行1在行0下不可見,當用戶單擊行0時,鏈接行1變爲可見。顯示使用jQuery
但是當我點擊這個鏈接第1行出現,但在第0行TD。
這裏是我的Jquery:
function expand_ClickEvent(rowData){
//get the TR that you want to show/hide
var _TR = $("#tr_0");
var TR = $("#tr_1");
//check its class
if (TR.hasClass('hide')){
TR.removeClass('hide'); //remove the hide class
TR.addClass('show'); //change it to the show class
TR.insertAfter(_TR);
//TR.show(); //show the TR (you can use any jquery animation)
} else {
TR.removeClass('show'); //remove the show class
TR.addClass('hide'); //change it to the hide class
TR.hide(); //hide the TR (you can use any jquery animation)
}
}
您的問題是什麼? – DarkAjax 2012-03-06 14:46:13
下排0 TD,而不是TR – 2012-03-06 14:50:08