Requirements: When a user enters the page, the branding list is reduced by default, and the user can click the Show All Brands button below the list of items to display all the brands.
<%@ Page Language="C #"Inherits="system.web.mvc.viewpage<dynamic>" %><!DOCTYPE HTML><HTML><Headrunat= "Server"> <Metaname= "Viewport"content= "Width=device-width" /> <Scriptsrc=".. /.. /scripts/jquery-2.2.3.js "></Script> <title>Index</title></Head><Body> <Divclass= "Subcategorybox"> <ul> <Li><ahref="#">Canon</a></Li> <Li><ahref="#">Sony</a></Li> <Li><ahref="#">Samsung</a></Li> <Li><ahref="#">Nikon</a></Li> <Li><ahref="#">Panasonic</a></Li> <Li><ahref="#">Casio</a></Li> <Li><ahref="#">Fuji</a></Li> <Li><ahref="#">Kodak</a></Li> <Li><ahref="#">Pentax</a></Li> <Li><ahref="#">Ricoh</a></Li> <Li><ahref="#">Olympus</a></Li> <Li><ahref="#">Benq</a></Li> <Li><ahref="#">Patriot</a></Li> <Li><ahref="#">Other branded cameras</a></Li> </ul> <Divclass= "ShowMore"> <ahref="#"ID= "C"><span>Show All Brands</span></a> </Div> </Div> <Script> varP= $("ul li:gt (7)"); P.hide (); $("#C"). Click (function(){ varQ; if(P.is (": Visible") ) {p.hide (); Q=$( This). Find ('span'). Text ("Streamline Display Branding"); } Else{p.show (); Q=$( This). Find ('span'). Text ('Show All Brands'); } }); </Script></Body></HTML>
Display effect:
jquery implements hidden tags