The example you showed is not using any animation at all, so you could “roll your own” version of the Accordion effect using the Protaculous Action. First set your menu content up along the same lines as a ScriptyAccordion:
header
div
p
p
p
header
div
p
p
etc.
The idea being that if you have a group of sub-options after a major option, you put those sub-options inside an inline HTML box (div) in order to group them together.
All of this should be nested within a single HTML box, and that’s the parent element that drives the whole effect. In this example, I’ve assumed you named that box (using the Inspector’s Title field) ‘menu’. If you called it something else, then you must change the code example below to match. I’ve further set this to work with h3 tags for the main menu elements, and p tags (normal HTML text) for the sub-menu elements. All of this is adjustable, as long as the main listings and sub-listings are different HTML tags. You can certainly style them to appear identical, they only have to be different at a code level.
Apply Protaculous to the page, and choose prototype-packed from the Library picker. Then click on the top Function Body button and paste in the following code:
var heads = $$('#menu > h3');
var subs = $$('#menu > div');
subs.invoke('hide');
heads.invoke('observe','mouseover',function(evt){
subs.invoke('hide');
if(this.next('div')){
this.next('div').show();
}
});
Believe it or not, that’s all you need to duplicate the look and feel of your example.
Walter
On Nov 4, 2011, at 5:41 AM, tonzodehoo wrote:
Thanks for that.
I guess I’m curious as to how to achieve the same level of control the altagamma page has with its menu. Is it something which can be built into the scripty accordion do you think?
The easy option is for me just to make it click rather than mouseover but its not that I’m wanting to create problems or more work for myself but more that I’d like to learn how to achieve the menu as I’d envisaged it which is what I see on the altagama site.
How can I affect the behaviour characteristics to get it to run more smoothly?
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options