Accordion js - Need expanded accordion to stay open as I click each <li> within the <ul>

http://www.guestservices.com/ourplanet_DRAFT2.html

On the above page I'd like to be able to click in the Green Initiatives on Columbia Island Marina and the menu stay expanded until I click another area

As it stands it refreshes, making the Green Team expand - I want it to stay on the Green Initiatives expansion after I click any of the li's within that accordion
jquery-1.7.1.min.js
jquery-ui-1.8.17.custom.min.js
script.js
html5.js
style.css
RickardP_GSIAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
Add the following code after creating the accordion :
$("a[href!='#']", "#pro_accordion").click(function(evt) { 
         evt.preventDefault();
         $.get($(this).attr("href"),function(data) {
                $(".extra-wrap:last").replaceWith($(".extra-wrap:last", data));
         });
});

Open in new window

0
 
RickardP_GSIAuthor Commented:
in which file?
0
 
leakim971PluritechnicianCommented:
in the file where you're creating the accordion
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
RickardP_GSIAuthor Commented:
Perfect!!!!  That works great - thank you so much!

Now if you look at:
http://www.guestservices.com/ourplanet_DRAFT2.html

and click on Columbia Island Marina (under Green Initiatves)
works great

then move your mouse to the left side of the page (where the logo is) and the middle content disappears
0
 
RickardP_GSIAuthor Commented:
Should I make that a separate ticket?
0
 
leakim971PluritechnicianCommented:
Sorry I can reproduce the bug.
0
 
RickardP_GSIAuthor Commented:
of course it's only doing it in IE9 - I checked FF, chrome, opera and it works fine in all those browsers
0
 
leakim971PluritechnicianCommented:
and before adding the code it don't do that?
work fine on IE10...
0
 
RickardP_GSIAuthor Commented:
Honestly I dont know if it was doing that before adding the code - the code could have nothing to do with it - that's why I'm saying you can keep this ticket or I open a new one - because it most likely is a separate issue - thoughts?
0
 
leakim971PluritechnicianCommented:
yes create a new one, thanks
0
 
RickardP_GSIAuthor Commented:
ok i'm doing that now
0
 
RickardP_GSIAuthor Commented:
named:

Disappearing Text when Mouse moves over content
0
All Courses

From novice to tech pro — start learning today.