mattegol
asked on
Expand accordion with button outside the accordion
Hi,
I need to expand panes in a accordion when clicking on a button outside of the accordion.
Are there any ways to do this server side, or do I need to make a javascript solution?
I need to expand panes in a accordion when clicking on a button outside of the accordion.
Are there any ways to do this server side, or do I need to make a javascript solution?
Sorry for the same page example is missing some code:
javascript code for the button:
javascript code for the button:
$(function){
$(".button").click(function(){
$(".accordion").accordion({active: 2});
});
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cool, i will now copy links to other tutorials in every question here. It seems to be more efficient.
Somtimes it is, not all the time though!
Open in new window
if you want to do expand a accordion via a button on a page other than the accordion page, pass a variable via get which holds the number of the pane you wann open like this:
Open in new window
on accodion.html:
Open in new window