This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PseudoClass(autotarget) { | |
this.targets = []; | |
if((autotarget != undefined) && (autotarget == true)) { | |
this.attach(true); | |
} | |
} | |
PseudoClass.prototype.addTarget = function(target) { | |
this.targets.push(target); | |
return target; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PopupClass(link, launch_now) { | |
if(link !== undefined) { | |
if(typeof link == "string") { | |
var link = $("#"+link); | |
} | |
this.href = link.attr('href'); | |
this.title = link.attr('title'); | |
this.properties = this.setProperties(); | |
if(launch_now !== undefined && launch_now == true) { | |
return this.launch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function inherit(subclass, superclass) { | |
var temp = function() {}; | |
temp.prototype = superclass.prototype; | |
subclass.prototype = new temp(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($.browser.msie) { | |
if(!Array.indexOf) { | |
Array.prototype.indexOf = function(obj){ | |
for(var i=0; i<this.length; i++){ | |
if(this[i]==obj){ | |
return i; | |
} | |
} | |
return -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(':input.promptText').focus(function() { | |
if($(this).val() == $(this).attr('title')) { | |
$(this).val(''); | |
} | |
}); | |
$(':input.promptText').blur(function resetField() { | |
if(!$(this).val()) { | |
$(this).val($(this).attr('title')); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AttachOnce() { | |
this.behavior($('.' + this.target_class)); | |
this.clean(); | |
} | |
AttachOnce.prototype.clean = function() { | |
$('.' + this.target_class).removeClass(this.target_class); | |
} | |
AttachOnce.prototype.behavior = function() { | |
// Will be overwritten. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Clone and Insert Attacher -------------------------------- */ | |
AttachOnceClass.add('CloneAndInsert', 'js_clone_and_insert', function(jquery_selector) { | |
// TODO: conside refactoring into a class | |
jquery_selector.click(function() { | |
var parent = $(this).parent(); | |
var insert = parent.find('.js_insert'); | |
var clone = parent.find('.js_clone').clone(true); | |
var count = insert.children().length + 2; | |
// Recursively make attributes unique in cloned html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a combination of: | |
http://meyerweb.com/eric/thoughts/2007/09/07/diagnostic-styling/ | |
http://www.nealgrosskopf.com/tech/thread.asp?pid=17 | |
.. with some additional tweaking and additions | |
*/ | |
/* Empty Attributes */ | |
img[alt=""], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Micro = (function() { | |
var proxy = function() {}; | |
var wrap = function(zuper, fn) { | |
return function() { | |
var saved = this.zuper; | |
this.zuper = zuper; | |
try { | |
return fn.apply(this, arguments); | |
} finally { | |
this.zuper = saved; |
OlderNewer