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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>sldk</title> | |
</head> | |
<body> | |
<p>etjebleuh</p> |
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
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind. | |
// Hat tip Paul Irish | |
var o = $( {}); | |
$.subscribe = o.on.bind(o); | |
$.unsubscribe = o.off.bind(o); | |
$.publish = o.trigger.bind(o); |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent;; | |
} |
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($) { | |
var o = $( {}); | |
$.each({ | |
on: 'subscribe', | |
trigger: 'publish', | |
off: 'unsubscribe' | |
}, function( key, api) { | |
$[api] = function() { | |
$[key].apply( o, arguments ); |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
/* Eric Meyer's reset reloaded | |
http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, font, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
dl, dt, dd, ol, ul, li, |
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 formValidation() { | |
jQuery.validator.addMethod("twowords", function(value, element) { | |
var tagCheckRE = new RegExp("(\\w+)(\\s+)(\\w+)"); | |
return tagCheckRE.test(value); | |
}, "At least two words."); | |
var numInputFieldsToCheck = | |
$('#contactForm').find('input').length -1 + | |
$('#contactForm').find('textarea').length; |
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 FastButton(element, handler) { | |
this.element = element; | |
this.handler = handler; | |
element.addEventListener('touchstart', this, false); | |
}; | |
FastButton.prototype.handleEvent = function(event) { | |
switch (event.type) { | |
case 'touchstart': this.onTouchStart(event); break; | |
case 'touchmove': this.onTouchMove(event); break; | |
case 'touchend': this.onClick(event); break; |
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(jQuery.browser) | |
{ | |
/* SmileyWar.com Mobile Orientation Detection */ | |
// set rules on initial load and when the screen changes size or orientation. | |
$(window).on("load resize",function(){ | |
var h = $(window).height(); | |
var w = $(window).width(); | |
if ( w < 768) { |
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
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( | |
src='images.gif', | |
sizingMethod='scale'); | |
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader( | |
src='images.gif', | |
sizingMethod='scale')"; |
OlderNewer