以下是漸變的js程式碼(表示多餘三行的要隱藏,點選"more"顯示剩下的,點選「less」要逐漸隱藏):
function showAccomplishmentTableRow(){
$("#accomplishmenttable tr:hidden").first().show(2000,funcftion( ){
showAccomplishmentTableRow();
});
if($("#accomplishmenttable tr:hidden").size()==0){
$("#accomplishmenttable"). next().attr("onclick","hideAccomplishmentTableRow()").text("Less");
}
}
function hideAccomplishmentTableRow(){
if($("#accomplish(""#accomplish tr:visible").size()$("#accomplishmenttable").next().attr("onclick","showAccomplishmentTableRow()").text("More");
return;
}
$("#accomplishmenttable tr:visible").last().hide(2000,function(){
hideAccomplishmentTableRow);
});
}
html
複製程式碼
複製程式碼
程式碼如下
MY ACCOMPLISHMENTS
border_bottom1Pgreye7e7e7
border_bottom1Pgreye7e7e7
|
ccborder_bottom1Pgreye7e7e7
|
More
|