2 components on top of each other (touch area and gesture-hover)

66 views
Skip to first unread message

bits...@gmail.com

unread,
Nov 18, 2015, 12:03:52 PM11/18/15
to Google Web Designer beta
Hello,

I'm currently looking for a solution to change the background of a <div> when hovering over it with the mouse. That can easily be done with the gesture component.

However, the button is already a tap area and only the layer on top of the other works.

Is there a solution for that?

Thank you :)

Sukhbir Kaur

unread,
Nov 18, 2015, 1:23:22 PM11/18/15
to gwd...@googlegroups.com
Hi ,

You can add an event to this . 

Here are the steps:
1.Create a File Ad/HTML
2. Draw a Div  on stage and in Properties panel give an ID (DIV1)
3.Right Click on the div and Invoke contextual menu 
4.Select Add Event 
      DIV1 > Mouseover>set styles>DIV1 
         Add property to change > background : blue 
5.Save and preview 
6 On Mouse over the Div color will change 
















Let me know if it  works for you .

See the attached sample file for your  reference .

Thanks
Sukhbir
(GWD Team)

HoverChangeColorTest.zip

bits...@gmail.com

unread,
Nov 18, 2015, 2:22:43 PM11/18/15
to Google Web Designer beta
Hey,

thanks a lot for the response!

Unfortunately the solution is not what I'm looking for, because the color only changes once and does not change back when hovering away from the button.

However, I found an solution.

I am using the hover event of the gesture component to change the background color on hovering. And instead of using the tap area component for navigating to the second page, I am using the event click-> page for the DIV of the button.

It works :)

Reply all
Reply to author
Forward
0 new messages