topical media & game development
lib-js-code-jquery.expose-1.0.1.js / js
jquery.expose 1.0.1 - Make HTML elements stand out
Copyright (c) 2009 Tero Piirainen
http://flowplayer.org/tools/expose.html
Dual licensed under MIT and GPL 2+ licenses
http://www.opensource.org/licenses
Launch : June 2008
Version : 1.0.1 - Wed Apr 15 2009 08:37:07 GMT-0000 (GMT+00:00)
(function(.isFunction(fn)) {
try {
return fn.call(self);
} catch (error) {
if (opts.alert) {
alert("Error calling expose." + name + ": " + error);
} else {
throw error;
}
return false;
}
}
return true;
}
// mask instance (singleton)
var mask = null;
// exposed elements
var exposed, conf = null;
var origIndex = 0;
// global methods
.expose.close();
}
});
// clicking on the mask closes all
if (opts.closeOnClick) {
mask.bind("click.unexpose", function() {
.each(els, function() {
var el = this;
if (!/relative|absolute/i.test(el.css("position"))) {
el.css("position", "relative");
}
});
// make elements sit on top of the mask
els.css({zIndex:opts.zIndex + 1});
// background color of the mask
if (opts.color) {
mask.css("backgroundColor", opts.color);
}
// reveal mask
if (!this.isLoaded()) {
mask.css({opacity: 0, display: 'block'}).fadeTo(opts.loadSpeed, opts.opacity, function() {
fireEvent(opts, "onLoad", .browser.msie ? origIndex : null});
fireEvent(conf, "onClose", self);
});
}
};
// jQuery plugin initialization
.extend(opts, conf);
// call expose function
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.