[solved] mouseover and dojo.

Game development with Board Game Arena Studio
Post Reply
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

[solved] mouseover and dojo.

Post by Rudolf »

Hello,
I would like to replace :hover with a created class:

in css

Code: Select all

.hover
{
	border-color: #FFFFFF;
}

in js

Code: Select all

dojo.connect($('p_'+r+'_'+c), "mouseover", function(evt){ dojo.stopEvent(evt); dojo.addClass(node, "hover");});


it seems not to be the right way?
Last edited by Rudolf on 12 May 2013, 20:05, edited 1 time in total.
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: mouseover and dojo.

Post by pikiou »

Try this (untested):

Code: Select all

dojo.connect($('p_'+r+'_'+c), "onmouseover", function(evt){ dojo.stopEvent(evt); dojo.addClass(evt.currentTarget, "hover");});
If you plan on removing the 'hover' class at onmouseout, keep in mind you can use dojo.query('*:hover') rather than add a class and use dojo.query('.hover')
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: mouseover and dojo.

Post by Rudolf »

oups merci pikiou, I had a code for an old version!
Post Reply

Return to “Developers”