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
jQuery.fn.aspHide = function() { | |
var elem = $(this[0]); | |
elem.data('height', elem.height()); | |
elem.height('0'); | |
elem.css('visibility', 'hidden'); | |
}; | |
jQuery.fn.aspShow = function() { | |
var elem = $(this[0]); | |
elem.height(elem.data('height')); |
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
jQuery.fn.innerWrap = function() { | |
var a, args = arguments; | |
return this.each(function() { | |
if (!a) | |
a = jQuery.clean(args, this.ownerDocument); | |
// Clone the structure that we're using to wrap | |
var b = a[0].cloneNode(true), | |
c = b; | |
// Find the deepest point in the wrap structure | |
while ( b.firstChild ) |
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
//Gallery Thumbs | |
$("div.thumbs > a").click(function (e){ | |
$("div.thumbs > a").removeClass("active"); //Remove any "active" class | |
$(this).addClass("active"); //Add "active" class to selected tab | |
$(".gallery_content").hide(); //Hide all tab content | |
var activeTab = $(this).attr("href"); //Find the rel attribute value to identify the active tab + content | |
$(activeTab).fadeIn(); //Fade in the active content | |
setTimeout(function () { | |
Cufon.refresh(); |
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 fizzbang = function(){ | |
return { | |
foo : function(){ | |
alert('This is a method'); | |
}, | |
bar : function(){ | |
alert('This is also a method'); | |
} | |
}; | |
}(); |
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 checkReady = setInterval(function(){ | |
if (document.readyState == "complete") { | |
document.write('Document ready'); | |
clearInterval(checkReady); | |
} | |
}, 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
javascript:(function(){(function(){var el=document.createElement('div'),b=document.getElementsByTagName('body')[0];otherlib=false,msg='';el.style.position='fixed';el.style.height='32px';el.style.width='220px';el.style.marginLeft='-110px';el.style.top='0';el.style.left='50%';el.style.padding='5px 10px 5px 10px';el.style.zIndex=1001;el.style.fontSize='12px';el.style.color='#222';el.style.backgroundColor='#f99';function getLint(url){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;}};head.appendChild(script);}function getScript(url,success){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done= |
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 queueExecutionInterval = 200, | |
debug = function (call) { | |
if ("console" in window) { | |
console.log.apply(call); | |
} | |
}, | |
QUEUE = [], | |
SECONDARY = [], | |
functionContainer, primaryThread = setInterval(function () { // QUEUE.push( function ) to register item for queue processing. | |
if (QUEUE.length > 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
var obj1index = obj1.length; | |
for (var obj2index in obj2){ | |
obj1[obj1index] = obj2[obj2index]; | |
obj1index++; | |
} |
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
Object.create2 = function(a, b) { | |
var res = Object.create(a); | |
for (var x in b) { if (b.hasOwnProperty(x)) res[x] = b[x]; } | |
return res; | |
} | |
var o = Object.create2(foo, { f:0, g: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
class Main | |
get "/js/:application.js" do | |
content_type "text/javascript", :charset => "UTF-8" | |
CoffeeScript.compile File.read("app/views/js/#{params[:application]}.coffee") | |
end | |
end |
OlderNewer