Ok,

I've surprised myself by solving these problems, so If anyone else is
searching for the same thing here's how:

ACCORDION:

<script type="text/javascript">

$(function() {

$("#accordion").accordion({
active: false,
collapsible: true,
autoHeight: false,
navigation: true,
header: '.menuitem'
});

$(".menuitem").click(function(event){
window.location.hash=this.hash;
});

});
</script>

###################################

HTML:

<div id="accordion">

<a class="menuitem" href="#1">FIRST SECTION</a>

<!-- accordion panel --><div>

<p>CONTENT OF PANEL HERE</>

<a href="javascript:$('#accordion') .accordion('activate', -1)"
class="closelink">Close</a> <!-- CLOSE PANEL -->

<!-- end accordion panel --></div>


<a class="menuitem" href="#2">SECOND SECTION</a>

<!-- accordion panel --><div>

<p>CONTENT OF PANEL HERE</>

<a href="javascript:$('#accordion') .accordion('activate', -1)"
class="closelink">Close</a> <!-- CLOSE PANEL -->

<!-- end accordion panel --></div>

<!-- end accordion -->

###################################

LINK FORM ANOTHER PAGE:

<a href="NAME OF PAGE.html#2">LINK</a> <!-- OPENS PANEL 2! -->


Cheers,

Duncan.

--



On 17 Mar, 17:23, duncanm <[email protected]> wrote:
> Hi all,
>
> I have set up an accordion with 7 tabs that are all closed on page
> load. Exactly what I want.
>
> However, I want to make a link from another page that opens tab no:5
> when the page loads.
>
> Is this possible? And if so, how?
>
> I would also like to make a link at the end of the content in each
> section that closes the accordion -- I'm guessing the solution for
> this is very similar...
>
> Cheers,
>
> Duncan.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to