Target Show/Hide Layer is designed to work on an HTML box (DIV) as well as any other layered content. You can set the trigger elements to be exclusive as you like. I forget the exact name, but fiddle around with Sticky and its friends in the Restore picker of the Rollover Action (which is what you will use to trigger the show/hide behavior).
But if the element is in the Hype animation, there is no way you can use those Actions.
If I were hand-coding it, I would follow the same technique I usually do (so as to end up with the least amount of code possible):
-
Gather a reference to all of the elements.
-
On any click, hide all of them, then show only the one I want.
var ids = $w(‘one two three’);
var layers = ids.map(function(i){ return $(i); }).invoke(‘hide’);
layers.first().show();
document.on(‘click’, ‘a[href*="#"]’, function(evt, elm){
var id = elm.readAttribute(‘href’).split(’#’).last();
if(ids.include(id)){
evt.stop();
layers.invoke(‘hide’);
$(id).show();
}
});
I have an example posted: untitled
View source to see how it works.
Walter
On Feb 21, 2013, at 5:57 PM, Trey Yancy wrote:
Very helpful.
Question 1:
What do I do if the object is a div? (an HTML5 animation within a markup item).
Question 2:
There are obviously things going on behind the scenes with the action but I assume that there is a string of some sort that I can use in the HTML5 animation to create a script that will hide/show a layer on the page.
How do I set up a boolean? (e.g., three buttons, three objects, any time one object is visible, the other two objects are hidden).
garbage code example:
onClick
if
visibility [objectOne] = true,
setVisibility [objectTwo] = false,
setVisibility [objectThree] = false,
endIf
endClick
Is there a simple way to do this in Freeway? (see cheap simulation at:
http://ohair.com/__Test/indexbtest.html (click on the green text link at the bottom)
Thanks,
TY
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