how can I add a mouse over(on a div) Action?

817 views
Skip to first unread message

des...@andreipop.de

unread,
Oct 2, 2013, 1:44:28 PM10/2/13
to gwd...@googlegroups.com
how can I add a mouse over(on a div) Action?

Kishore Subramanian

unread,
Oct 2, 2013, 2:12:43 PM10/2/13
to gwd...@googlegroups.com
GWD does not support events on native HTML elements in the Events panel in this release. Events are supported in the UI only for Components. However, it is fairly simple to add an event using the Code view. I have attached an example. 
I drew a DIV using GWD, switched to Code view and added
<script>
    document.querySelector('.gwd-div-sqhx').addEventListener('mouseover', function() {
        console.log('mouse over event on div');
        });
</script>

just above the </body> tag. 

Please let us know if this does not work for you.
Events for native HTML elements is something we are looking into for a future release.

~ Kishore (GWD Engineer)


div-mouseover-test.html

des...@andreipop.de

unread,
Oct 2, 2013, 2:47:31 PM10/2/13
to gwd...@googlegroups.com
Thanks, your script works! However, will be this feature in the future be supported?

Having just touch/click as an event might be not enough.

For example i want to create a button an on mouse over to have an animation.

Kevin

unread,
Oct 4, 2013, 10:56:25 AM10/4/13
to gwd...@googlegroups.com
+1 to this

trindle...@gmail.com

unread,
May 2, 2014, 11:52:39 AM5/2/14
to gwd...@googlegroups.com
Do I have to change anything else apart from adding the script?
Reply all
Reply to author
Forward
0 new messages