Documentation

include MVC MVC.Animate MVC.Class MVC.Controller MVC.Controller.Action MVC.Controller.Action.Drag MVC.Controller.Action.Drop MVC.Controller.Action.EnterLeave MVC.Controller.Action.Event MVC.Controller.Action.Hover MVC.Controller.Action.Lasso MVC.Controller.Action.Selectable MVC.Controller.Action.Subscribe MVC.Controller.Comet MVC.Controller.Params MVC.Controller.Params.Drag MVC.Controller.Params.Drop MVC.Controller.Stateful MVC.Delegator MVC.Doc MVC.Element MVC.Event MVC.File MVC.History MVC.IO MVC.IO.Ajax MVC.IO.Comet MVC.IO.JsonP MVC.IO.WindowName MVC.IO.XDoc MVC.Model MVC.Model.Ajax MVC.Model.Cookie MVC.Model.JsonP MVC.Model.JsonRest MVC.Model.WindowName MVC.Model.XmlRest MVC.Native MVC.Native.Array MVC.Native.Date MVC.Native.Function MVC.Native.Number MVC.Native.Object MVC.Native.String MVC.Options MVC.Store MVC.SyntheticEvent MVC.Test MVC.Test.Assertions MVC.Test.Controller MVC.Test.Functional MVC.Test.Runner MVC.Test.Unit MVC.Timer MVC.Timer.Easings MVC.Vector MVC.View MVC.View.Helpers OpenAjax

MVC.Controller.Action.Hover

Provides hoverenter and hoverleave Controller actions.

Hoverenter is called only when a user stops moving their mouse over an element. This is good to use when mouseover is expensive, or would be annoying to the user.

Hoverout is called on mouseout of an element that has had hoverenter called.

Example

TasksController = MVC.Controller.extend('tasks',{
  hoverenter : function(params){ params.element.style.background = "red" },
  hoverleave : function(params){ params.element.style.background = "" }
})

Install

include.plugins('controller/hover')

Adjusting Sensitivity and Interval

Change the sensitivity or interval to change how quickly a hoverover will take place.

Static Methods

hovers

Stores hover actions by CSS

interval

Time between requests.

sensitivity

How many pixels the mouse can move and still trigger a hoverenter

Prototype Methods

check

check() -> undefined
Checks if 2 mouse moves are within sensitivity

hoverenter

hoverenter(params) -> undefined
Calls hoverenter if there is one.
{Object} -

hoverleave

hoverleave(params) -> undefined
Calls hoverleave if there is one.
{Object} -

init

init(action_name, callback, className, element, action, f, controller) -> undefined
If the first called, attaches mouseover, mouseout events
{} -
{} -
{} -
{} -
{Object} -
{Object} -
{Object} -

mousemove

mousemove(event) -> undefined
Updates the current_position of the mosuemove. Calls hovermove if it's been moved
{Object} -

mouseout

mouseout(params) -> undefined
{Object} -

mouseover

mouseover(params) -> undefined
Called on the mouseover. Sets up the check.
{Object} -