我有以下代码用于工作正常的手风琴内容持有者。我似乎无法锻炼如何将页面自动滚动到单击部分的顶部。现在容器打开,但页面根本不滚动。
请帮忙 !G
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name = "viewport" content = "user-scalable = no">
<title>TEST</title>
<link href="style/english.css" rel="stylesheet" type="text/css" />
<link href="style/reset.css" rel="stylesheet" type="text/css" />
<link href="style/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<script type="text/javascript" src="scripts/jquery1.8.2.min.js"></script>
<script type="text/javascript" src="scripts/jquery-ui-1.10.3.custom.js"></script>
<!--Accordian menu JQuery-->
<script type="text/javascript">
$(function() {
$( "#accordion" ).accordion({
active: 'none',
heightStyle: "content",
collapsible: true,
/*heightStyle: "fill"*/
});
});
</script>
<script>
function Clicked1(){
$( "#accordion" ).accordion({ active: 0 });
}
function Clicked2(){
$( "#accordion" ).accordion({ active: 1 });
}
function Clicked3(){
$( "#accordion" ).accordion({ active: 2 });
}
function Clicked4(){
$( "#accordion" ).accordion({ active: 3 });
}
function Clicked5(){
$( "#accordion" ).accordion({ active: 4 });
}
function Clicked6(){
$( "#accordion" ).accordion({ active: 5 });
}
</script>
<!--Accordian menu JQuery-->
</head>
<body>
<div id="mainContainer" style="background-color:#009edb;">
<!--Header-->
<div id="headerContainer">
<a href="index.html"><img src="images/header.jpg" width="1000" height="110" border="0" /></a>
<!--Menu-->
NAVIGATION CODE
<!--Menu-->
</div>
<!--Header-->
<!--Body-->
<div id="mainBodyContainerWhite">
<div id="topExtra"></div>
<!--Spotlight-->
<div id="spotlightBoxContainer">
<div id="spotlightBoxFull" style="height:440px;"><img src="images/case_spotlight.jpg" width="986" height="508" usemap="#Map2" border="0" />
<map name="Map2" id="Map2">
<area shape="rect" coords="1,1,247,169" href="#section1" onclick="Clicked1()" id="scroll" />
<area shape="rect" coords="494,2,740,169" href="#section1" onclick="Clicked2()" id="scroll" />
<area shape="rect" coords="248,170,492,338" href="#section1" onclick="Clicked3()" id="scroll" />
<area shape="rect" coords="741,171,983,335" href="#section1" onclick="Clicked4()" id="scroll" />
<area shape="rect" coords="3,338,247,506" href="#section1" onclick="Clicked5()" id="scroll" />
<area shape="rect" coords="491,338,739,507" href="#section1" onclick="Clicked6()" id="scroll" />
</map>
</div>
</div>
<!--Spotlight-->
<div id="accordion">
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 1</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 2</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 3</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 4</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 5</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
<h3 style="border-top:solid 1px #009edb; border-bottom:solid 1px #009edb;">ACCORDIAN 6</span></h3>
<div class="accordion-content">
<div id="ContainerLeftInner">
<div class="textInner">
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST.
</div>
</div>
</div>
<!--Split-->
</div>
<!--Spotlight-->
</div>
</div>
<!--Body-->
<div id="footerContainer"></div>
</body>
</html>