Page 1 of 1

[solved] mouseover and dojo.

Posted: 12 May 2013, 16:48
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?

Re: mouseover and dojo.

Posted: 12 May 2013, 17:07
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')

Re: mouseover and dojo.

Posted: 12 May 2013, 19:59
by Rudolf
oups merci pikiou, I had a code for an old version!