Possible Duplicate:
Modify Jquery functionality for divs
There is already a code for expandAll /collpaseAll all divs. http://www.adipalaz.com/experiments/jquery/expand.html. If you scroll down you will be able to see the files/code.
What I am trying since last 2 days is to get another link of [ExpandAll/CollpaseAll] at the bottom of all the divs(right now there is only 1 link thats on top of all divs).
<script type="text/javascript">
$(function() {
// --- Using the default options:
$("h2.expand").toggler();
// --- Other options:
//$("h2.expand").toggler({method: "toggle", speed: 0});
//$("h2.expand").toggler({method: "toggle"});
//$("h2.expand").toggler({speed: "fast"});
//$("h2.expand").toggler({method: "fadeToggle"});
//$("h2.expand").toggler({method: "slideFadeToggle"});
$("#content").expandAll({trigger: "h2.expand", ref: "div.demo", localLinks: "p.top a"});
});
</script>
<body>
<div id="wrapper" class="demo">
<h3 class="expand"> Number 1</h3><div class="collapse">
<table><tr><td> I am number one</td></tr></table></div>
<h3 class="expand"> Number 2</h3><div class="collapse">
<table><tr><td> I am number two</td></tr></table></div>
</div></body>
If you look at the other examples on the same site, you’ll find the following page, which may be useful to you:
http://www.adipalaz.com/experiments/jquery/expandAll_alternative_use.html
To position the switch [ExpandAll/CollpaseAll]
at the bottom, you have to use the option
switchPosition:'after'
If you post your HTML code here, maybe someone will be able to show you exactly how to accomplish your goal.
The style of the font can be easily changed with CSS, e.g. :
.switch a {font-size:85%}
精彩评论