JQuery page Hide Collapse effect

Source: Internet
Author: User

<%@ page language= "C #" autoeventwireup= "true" codefile= "Default2.aspx.cs" inherits= "DEFAULT2"%>

<! DOCTYPE html>

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title></title>
<script src= "Js/jquery-1.7.2.min.js" ></script>
<style type= "Text/css" >
#d1 {
line-height:50px;
height:50px;
width:300px;
background-color:red;
Overflow:hidden;
}

#d2 {
line-height:50px;
height:50px;
width:300px;
Background-color:yellow;
Overflow:hidden;
}

#d3 {
line-height:50px;
height:50px;
width:300px;
Background-color:blue;
Overflow:hidden;
}
</style>
<body>
<form id= "Form1" runat= "Server" >
<div id= "D1" >
Configuration, the new car is equipped with leather seats, panoramic skylight, large-size LCD screen, panoramic image, remote driving, PM2.5 Green NET system, ATS full terrain mode, mobile power station and other configurations.
In terms of power, the new car will continue to use a hybrid system consisting of a 2.0T turbocharged engine and two motors with a maximum output power of 205 horsepower. The drive system matches the engine with a 6-speed dual-clutch gearbox. Its 0-100km/h acceleration time is 4.9 seconds. It is worth mentioning that the new car combines both hybrid (HEV) and pure Electric (EV) modes, with a pure electric mileage of 80 km. (Wen/Autohome aboutspeaker)
</div>
<div id= "D2" >
Road Test Score: 100

The Tesla Model S P85D was redesigned in the middle of the year, and the sporty 4-door 5-seater electric vehicle was powered by a 90-kilowatt-time battery pack, claiming a range of up to 294 miles. In addition, a 85-kilowatt-hour configuration is available for consumers to choose from, and after 5 hours of charging, the range can reach 220 miles. The Model S P85D performance is excellent, the acceleration is shocking, the operation is very smooth, comfortable feeling spontaneously. The central control Center, similar to the ipad, is fully functional, but it can also distract the driver. In addition, the Model S P85D is also equipped with all-wheel drive and active safety systems. But model S P85D also has some drawbacks, including difficult-to-access carriages, visibility and range limits, especially in cold weather conditions.
</div>

<div id= "D3" >
Road Test Score: 99

In the luxury sedan, the BMW 7 series has been lost to the Mercedes-Benz S-Class sedan, but the cash 7 Series sedan regardless of the driving stability, the smooth sense of the power system, the convenience of operation, the luxury of the interior is much more than people expected. The basic 740i is powered by a 3.0-liter 6-cylinder turbocharged engine, while the most representative 750i is powered by a 4.4-liter V8 turbo engine with a maximum power of 445hp and an all-wheel drive system. The 750i compartment is very quiet and is unmatched in detail and in the comfort of the seat. In addition, the quality of the interior is also a bright, built-in wood, leather, aluminum design and so on to make this model of modern feeling.
</div>
<div></div>
</form>
</body>
<script Type= "Text/javascript";
//Why do you write this here?
//Get auto height When the code will be executed once the auto height changes, the page after the page loading completed the div height is auto height,
// Here, we need to get him back to the default height at the back, and there will be no splash screen problem.
var autoHeight1 = $ ("#d1"). CSS (' height ', ' auto '). Height ();
var height1 = $ ("#d1"). CSS (' height ', ' # '). Height ()

$ ("#d1"). Toggle (
Function () {$ ("#d1"). Animate ({height:autoheight1}, 500);},
Function () {$ ("#d1"). Animate ({height: "50"}, 500);});
var autoHeight2 = $ ("#d2"). CSS (' height ', ' auto '). Height ();
var height1 = $ ("#d2"). CSS (' height ', ' # '). Height ()
$ ("#d2"). Toggle (
Function () {$ ("#d2"). Animate ({height:autoheight2}, 500);},
Function () {$ ("#d2"). Animate ({height: "50"}, 500);});
var autoHeight3 = $ ("#d3"). CSS (' height ', ' auto '). Height ();
var height1 = $ ("#d3"). CSS (' height ', ' # '). Height ()
$ ("#d3"). Toggle (
Function () {$ ("#d3"). Animate ({HEIGHT:AUTOHEIGHT3}, 500);},
Function () {$ ("#d3"). Animate ({height: "50"}, 500);});

</script>

JQuery page Hide Collapse effect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.