Home >Web Front-end >JS Tutorial >js gradient display gradient disappear sample code_javascript skills

js gradient display gradient disappear sample code_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:27:331110browse

The following is the gradient js code (indicates that more than three lines should be hidden, click "more" to display the rest, click "less" to gradually hide):

Copy code The code is as follows:

function showAccomplishmentTableRow(){
$("#accomplishmenttable tr:hidden").first().show(2000,function( ){
showAccomplishmentTableRow();
});
if($("#accomplishmenttable tr:hidden").size()==0){
$("#accomplishmenttable"). next().attr("onclick","hideAccomplishmentTableRow()").text("Less");
}
}
function hideAccomplishmentTableRow(){
if($("#accomplishmenttable tr:visible").size()<=3){
$("#accomplishmenttable").next().attr("onclick","showAccomplishmentTableRow()").text("More");
return;
}

$("#accomplishmenttable tr:visible").last().hide(2000,function(){
hideAccomplishmentTableRow();
}) ;

}

html
Copy code The code is as follows:



;th class="border_bottom3Pgreye7e7e7 border_right1Pgreye7e7e7 border_top1PWhite fontGreyGeneral textCenter roundedCorner_TL verticalMiddle width30P" colspan="2">MY ACCOMPLISHMENTS











border_bottom1Pgreye7e7e7
🎜>< td class="border_bottom1Pgreye7e7e7 border_right1Pgreye7e7e7 fontGreyGeneral p14Font textLeft width80P">
border_bottom1Pgreye7e7e7

border_bottom1Pgreye7e7e7


border_bottom1Pgreye7e7e7

&
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn