# \[Pro\] Scripty Accordian - is this possible?

**URL:** <https://discourse.softpress.com/t/pro-scripty-accordian-is-this-possible/6602>\
**Category:** Freeway\
**Created:** [January 11, 2010, 10:38am UTC](https://discourse.softpress.com/t/pro-scripty-accordian-is-this-possible/6602 "2010-01-11T10:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_worm1](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/m/bc8723/32.png) [@Mr\_worm1](https://discourse.softpress.com/u/Mr_worm1)\
**Post date:** [January 11, 2010, 10:38am UTC](https://discourse.softpress.com/t/pro-scripty-accordian-is-this-possible/6602/1 "2010-01-11T10:38:51Z")

</div>

As per the ScriptyAccordian action, as seen on the example below:

[http://scripty.walterdavisstudio.com/accordion/](http://scripty.walterdavisstudio.com/accordion/)

Is it at all possible to have the Accordian open at the 2nd, 3rd or even 4th ‘Heading’ and so on upon page load instead of the default first option available?

I still only want to show on element at a time too and wish for the structure of the list to remain in the same order, e.g. 1,2 open on page load,3,4

Many thanks

Worm

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [January 11, 2010, 1:49pm UTC](https://discourse.softpress.com/t/pro-scripty-accordian-is-this-possible/6602/2 "2010-01-11T13:49:01Z")

</div>

Not as it is written at the moment. You could modify the source code  
that it generates to make it do so, but you’d have to make those  
changes with a text editor each time you change the design.

This would be a lot easier if Freeway let you attach an ID to a header  
tag, but that’s not possible in the current UI.

If you check the “Show the first element when the page loads” checkbox  
in the Action, the code that gets added looks like this:

```
bods.first().show();

```

If you open the resulting page code up with a text editor, you can  
change the script to make the third element open like this:

```
bods[2].show();

```

(Note that the third item has index 2, because you start at 0 in an  
indexed object in JavaScript.)

I’ve already got a request on the spike to make a navigation  
“flavored” version of this Action, so that the current page’s URL  
would be used to determine if an element should be open or not. This  
would be a logical addition along those same lines.

Walter

On Jan 11, 2010, at 5:38 AM, Mr worm wrote:

> As per the ScriptyAccordian action, as seen on the example below:
> 
> [ScriptyAccordion](http://scripty.walterdavisstudio.com/accordion/)
> 
> Is it at all possible to have the Accordian open at the 2nd, 3rd or  
> even 4th ‘Heading’ and so on upon page load instead of the default  
> first option available?
> 
> I still only want to show on element at a time too and wish for the  
> structure of the list to remain in the same order, e.g. 1,2 open on  
> page load,3,4
> 
> Many thanks
> 
> Worm
> 
> * * *
> 
> freewaytalk mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Mr\_worm1](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/m/bc8723/32.png) [@Mr\_worm1](https://discourse.softpress.com/u/Mr_worm1)\
**Post date:** [January 11, 2010, 4:16pm UTC](https://discourse.softpress.com/t/pro-scripty-accordian-is-this-possible/6602/3 "2010-01-11T16:16:58Z")

</div>

As sure as the Sun will rise, there you are Walt!!!

Thank you

> I’ve already got a request on the spike to make a navigation  
> “flavored” version of this Action, so that the current page’s URL  
> would be used to determine if an element should be open or not. This  
> would be a logical addition along those same lines.
> 
> Walter

Hopefully this will be implemented in the next FW UI.

Worm

* * *

freewaytalk mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)
