Sha256: 7ac60fd8b4d1bc39d6d8867f48db859ed9c256188dfc566329c6be37b5e7273b
Contents?: true
Size: 1.11 KB
Versions: 24
Compression:
Stored size: 1.11 KB
Contents
//>>excludeStart("exclude", pragmas.exclude); define([ "shoestring" ], function(){ //>>excludeEnd("exclude"); /** * Trigger an event on each of the DOM elements in the current set. * * @param {string} event The event(s) to trigger. * @param {object} args Arguments to append to callback invocations. * @return shoestring * @this shoestring */ shoestring.fn.trigger = function( event, args ){ var evts = event.split( " " ); return this.each(function(){ var split, evt, namespace; for( var i = 0, il = evts.length; i < il; i++ ){ split = evts[ i ].split( "." ), evt = split[ 0 ], namespace = split.length > 0 ? split[ 1 ] : null; if( evt === "click" ){ if( this.tagName === "INPUT" && this.type === "checkbox" && this.click ){ this.click(); return false; } } if( doc.createEvent ){ var event = doc.createEvent( "Event" ); event.initEvent( evt, true, true ); event._args = args; event._namespace = namespace; this.dispatchEvent( event ); } } }); }; //>>excludeStart("exclude", pragmas.exclude); }); //>>excludeEnd("exclude");
Version data entries
24 entries across 24 versions & 1 rubygems