Skip to content

function_on

Wesley de Groot edited this page Oct 23, 2015 · 30 revisions
            	     _    _____ 
        	        | |  / ____|
    	            | |  | (___ 
	            _   | |  \___  \
 ______    _   | |__| |  ____) |
|______|  (_)   \____/  |______/

Function on

_('.wrapper').on(myEvent,callback)

On ... event

  • @param object [object] Wrapper
  • @param string myEvent event
  • @param function|bool callback Function to use|remove
  • @return null
  • @example _('.wrapper').html('x').on('mousemove', function(){console.log('moved');});
  • @example _('.wrapper').html('x').on('mousemove', true); // Remove.
  • @example _('.wrapper').on('mousemove', function(){console.log('moved');});
  • @example _('.wrapper').on('mousemove', true); // Remove.
Example:

_('.wrapper').html('x').on('mousemove', function(){console.log('moved');});

_('.wrapper').html('x').on('mousemove', true); // Remove.

_('.wrapper').on('mousemove', function(){console.log('moved');});

_('.wrapper').on('mousemove', true); // Remove.



[Back to function list](https://github.com/wesdegroot/_.js/wiki/Function%20List)

Clone this wiki locally