Showing posts with label element. Show all posts
Showing posts with label element. Show all posts

Monday, March 26, 2012

How do I change the cursor style when the user hovers over a DIV element?

A simple question: I just want to change the style of the cursor when the user hovers over a DIV element. I know how to do it in JavaScript, I'm just wondering if there is an ATLAS way to do it.

Thanks in advance!

Disregard the previous question. That can be achieved simply by setting the CSS stlye of the element. What I meant to ask is how do I change the cursor to a "move" type when the mouse is clicked on the DIV element, as in the case when it is dragged around using the ATLAS drag and drop functionality.

Wednesday, March 21, 2012

How can I handle Popup control auto hiding?

I useSys.UI.PopupBehavior to show a popup:

// find popup

popup =new Sys.UI.Control($("tblMenu<%= ClientID %>"));var elt = popup.element;// initilize popup

popup.element.style.zIndex = 10000;

popup.initialize();

var b = popup.get_behaviors()// initilize behavior to the popup

behavior =

new Sys.UI.PopupBehavior();

behavior.set_positioningMode(Sys.UI.PositioningMode.Absolute);

b.add(behavior);

behavior.initialize();

// visibility handlingif (flag){behavior.show();}else{behavior.hide();}

It's working very good but I'd like that the popup'd disappear after mouse leave it.

How can I do it?

Use the onmouseout event to do behavior.hide()