Well... Rule 1rst --> Don't talk too fast!
The function I thought "great" is actually not really... How to say... As perfect as I thought!
I'm going to try to explain this the best way I can...
When I first click on one section, the related exhibitions links expand and:
-the "+" sign change into the "-" one = Great!
When I re-click on this same section, the related exhibition links expand-back up normally, BUT:
-the "-" sign don't switch into the "+" one and stay "-" = Not great!
Also:
When I click on a section, leave it expanded and click on a another one that also expands:
-the first section recovers her "-" sign while is still expanded!! = Not great!
and
-the second expanded section change into the "minus sign" = Great!
So, basically what I want to reach is this:
When I first click on a section:
-the "+" sign change into the "-" one since it's expanded.
-->when I re-click on this same section, the "-" sign becomes "+" since it's not expanded.
Then:
When I click on a section (that expands) and on an other one (that expands also):
-I want the two sections to show the "-" sign since they are both expanded.
For the rest, the code does a very good job!
I've changed a couple of things to make it a bit personalized but here how it looks:
(hope the forum and stuffs is not going to go too crazy!)
$(document).ready(function()
{
setTimeout('move_up()', 1);
expandingMenu(0);
expandingMenu(1);
expandingMenu(2);
expandingMenu(3);
expandingMenu(4);
expandingMenu(5);
expandingMenu(6);
$("#menu ul li.section-title").nextAll().hide();
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
$("li.active").prevAll(".section-title").addClass("active-section");});
$("#menu ul li.section-title").click(function(){
$("#menu ul li.section-title").removeClass("active-section").prevAll().nextAll().hide();
$(this).nextAll().prevAll(".section-title").addClass("active-section");});});
In my Style.Css, I have this to make it... Happen.
#menu ul li.section-title {
color: #000000;
text-decoration: none;
background: url('http://mywebsite.fr/files/plus.png') no-repeat scroll -1px 1px transparent;
}
#menu ul li.section-title.active-section{
color: #000000;
text-decoration: none;
background: url('http://mywebsite.fr/files/minus.png') no-repeat scroll -1px 1px transparent;
}
And that's about it...
If anyone has a bit of patience for me, it would be amazing!
Thx.