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
//ie6 pngfix | |
if ($.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent)) { | |
$('*').filter(function(){ | |
return $(this).css('backgroundImage').indexOf('.png') >= 0; | |
}).addClass('png-fix'); | |
$('img[src$=.png]').addClass('png-fix'); | |
DD_belatedPNG.fix('.png-fix'); | |
} |
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
$(document).ready(function () { | |
IT.EvenWidths(".header-wrap nav > ul:first", ".header-wrap nav > ul:first > li"); | |
IT.EvenWidths(".list ul", ".list li"); | |
IT.Navigation(".header-wrap nav"); | |
}); | |
IT.EvenWidths = function(parentSelector, childSelector) { | |
var $parent = $(parentSelector); |
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
IT.Utilities.evenWidths = function(parentSelector, childSelector) { | |
var $parent = $(parentSelector); | |
var parentWidth = $parent.width(); | |
var $child = $(childSelector); | |
var totalWidthOfChildren = 0; | |
var padding = 0; | |
$child.each(function(i) { | |
totalWidthOfChildren += $(this).outerWidth(); |
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
$("#foo").after('<li id="dom-el"><a href="/Register">Sign up</a><span></span></li>'); | |
(function(){ | |
if ($("#dom-el").length) { | |
myFunction();; | |
} else setInterval(arguments.callee(),100); | |
})(); |
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
Utilities.enterPress = function(config) { | |
$(config.trigger).keydown(function(ev){ | |
// cross browser keyCode | |
var code = (event.keyCode ? event.keyCode : event.which); | |
if(code == 13) { | |
// default enterPress may submit an aspnetForm | |
ev.preventDefault(); | |
config.func(); | |
} | |
}); |
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
// html | |
<script type="text/javascript" src="http://crypto-js.googlecode.com/files/2.0.0-crypto-min.js"></script> | |
<script type="text/javascript" src="write-email.js"></script> | |
<a id="contact" href=""></a> | |
// contents of write-email.js | |
Egan.contact = Crypto.charenc.Binary.stringToBytes("myname@myemailaddress.com"); |
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
Egan.randomHexCodeCycle = function () { | |
function rgbToHex(rgb) { | |
var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(rgb), | |
red = parseInt(digits[2]), | |
green = parseInt(digits[3]), | |
blue = parseInt(digits[4]), | |
rgb = blue | (green << 8) | (red << 16); | |
return digits[1] + '#' + rgb.toString(16); | |
} |
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
Egan.randomHexCodeBgCycle.init({ | |
element: document.getElementById("h4-randomHexCodeBgCycle"), | |
hexArray: ["a", "e", "c"], | |
speed: 3000, | |
cssProperty: 'color' | |
}); | |
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
Egan.randomHexCodeCycle.init({ | |
element: document.getElementById("randomHexCodeCycleDemo2-js"), | |
hexArray: ["a", "e", "c"], | |
speed: 3000, | |
cssProperty: 'background-color' | |
}) |
OlderNewer