开发者

Jquery modification needed for an existing expand collapse functionality [duplicate]

This question already exists: Closed 11 years ago. 开发者_JAVA技巧

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%}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜