Acme-MUDLike
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == undefined && event.clientX != undefined ) {
var e = document.documentElement, b = document.body;
event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
}
// check if target is a textnode (safari)
if (jQuery.browser.safari && event.target.nodeType == 3) {
// store a copy of the original event object
// and clone because target is read only
var originalEvent = event;
event = jQuery.extend({}, originalEvent);
// get parentnode from textnode
event.target = originalEvent.target.parentNode;
// add preventDefault and stopPropagation since
// they will not work on the clone
event.preventDefault = function() {
return originalEvent.preventDefault();
};
event.stopPropagation = function() {
return originalEvent.stopPropagation();
};
}
// fix preventDefault and stopPropagation
if (!event.preventDefault)
event.preventDefault = function() {
this.returnValue = false;
};
if (!event.stopPropagation)
lib/Acme/MUDLike.pm view on Meta::CPAN
elem.queue[type].shift();
// Get next function
var f = elem.queue[type][0];
if ( f ) f.apply( elem );
}
},
/*
* I originally wrote fx() as a clone of moo.fx and in the process
* of making it small in size the code became illegible to sane
* people. You've been warned.
*/
fx: function( elem, options, prop ){
var z = this;
// The styles
var y = elem.style;
( run in 0.265 second using v1.01-cache-2.11-cpan-1c8d708658b )