***SOLVED***How to toggle an object or layer's visibility?

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

***SOLVED***How to toggle an object or layer's visibility?

Post by Philip Fong »

I want to hide a sticky layer when another object is visible and unhide when with another object, such as on "invisible" hide or show, thanks.
pajadt
 
 
Posts: 304
Joined: Sat Mar 16, 2013 11:23 am
Location: Europe
Contact:

Re: How to toggle an object or layer's visibility?

Post by pajadt »

Hi
You want one layer object to be visible and the other not, and when you click on for example shape, the first layer is hidden and the second appears with toggle.

That you can get with options event at shape
- if layer1 and layer 2 same size and position than you can do toggle only at second layer, which must be hidden - and activate him click at shape

- if layer1 and layer 2 not same size or not have same position than must create two shapes where first hide first layer, and activate second / with events
1. toggle layer 2
2. hide layer 1

Ar Second shape do next with events
1. toggle layer 1
2. hide layer 2
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

Re: How to toggle an object or layer's visibility?

Post by Philip Fong »

Thanks, but I wanted the "hide" & "unhide" with the "visibility" of the other object like: When object A is visible in the page, Object B is hidden and vise versa, without mouse click.
User avatar
Pablo
 
Posts: 21584
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: How to toggle an object or layer's visibility?

Post by Pablo »

There is no standard solution for this. There is no event in HTML that is triggered when the visibility of an object changes, so this requires a custom script where you keep track of the visibility with a variable.
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

Re: How to toggle an object or layer's visibility?

Post by Philip Fong »

I see, I was hoping web design tool can do that or HTML5 should have feature like Flash animation in the past. Thank anyway. :D
pajadt
 
 
Posts: 304
Joined: Sat Mar 16, 2013 11:23 am
Location: Europe
Contact:

Re: How to toggle an object or layer's visibility?

Post by pajadt »

Hi
You didn't explain exactly what exactly you want to achieve with the design, what you use layers, grids, maybe it's possible, or share the project or example where u see that, or contact me via fb. Maybe it can be done
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

Re: How to toggle an object or layer's visibility?

Post by Philip Fong »

Occasionally, I saw some website that has mini menu button that appear when scroll down and disappear when reached the top, I don't see any extension that can do that.
User avatar
Pablo
 
Posts: 21584
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: How to toggle an object or layer's visibility?

Post by Pablo »

You can use scroll events to implement this.
https://wysiwygwebbuilder.com/bookmark_events.html
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

Re: How to toggle an object or layer's visibility?

Post by Philip Fong »

The bookmark event can only show the hidden object when scroll down but cannot hide it after that when I scroll back to the top, I want the object remain visible no matter how far down but must hide when it reaches back to the top, I tried using another bookmark to hide it but no effect.

I can show & hide it if I use the same bookmark but only a short visible section.
wwonderfull
 
 
Posts: 1255
Joined: Fri Aug 21, 2020 8:27 am

Re: How to toggle an object or layer's visibility?

Post by wwonderfull »

Without seeing your project on what you are up to, or visualizing what you really want, it is very difficult to perceive what would be your satisfying result. The viewport transition may take custom script may look great or may look non responsive in mobile devices as layers are not responsive. If you want you can illustrate what you want (Draw and give us a screen shot) and if there is an alternative way of showing what you want to view then may be we can aid some support.
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: How to toggle an object or layer's visibility?

Post by BaconFries »

wwonderfull wrote: Tue Sep 22, 2020 5:57 pm as layers are not responsive.
Where does it say layers are not "Responsive" they can be used but it is probably best to use "Layout Grids" or "Flex Grid / Box"
Create a responsive website with anchored layers
https://www.wysiwygwebbuilder.com/anchored_layers.html
Create a responsive website with floating layers
https://www.wysiwygwebbuilder.com/floating_layers.html
Which layout mode should I choose?
Layers
https://www.wysiwygwebbuilder.com/forum ... 10&t=76722
Philip Fong
 
 
Posts: 22
Joined: Thu Jul 31, 2014 2:16 pm

Re: How to toggle an object or layer's visibility?

Post by Philip Fong »

Ok, I found a way using animate javascript instead. the file is here, thank you very much for the help.
https://drive.google.com/file/d/1ffw-ur ... sp=sharing
Post Reply