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 backgroundPos, | |
xPos, | |
yPos; | |
if( $j("html").hasClass("ie8")) { // html class... you know... it's useful | |
xPos = $j(this).css("background-position-x"); | |
yPos = Number($j(this).css("background-position-y").replace(/[^0-9-]/g, '')); | |
} else { | |
backgroundPos = $j(this).css("backgroundPosition").split(" "); | |
xPos = backgroundPos[0], |
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
window.onresize = function(e) { | |
delay(function(){ | |
// do something..... | |
}, 250); | |
} | |
var delay = (function(){ | |
var timer = 0; | |
return function(callback, ms){ | |
clearTimeout (timer); |
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
// --------- keyboard navigation control --------- // | |
var isinmotion = false; | |
$j(document).keydown(function(e){ | |
switch (e.keyCode) { | |
case 38: | |
//console.log("up"); | |
if (isinmotion) { | |
return false; | |
} else { | |
var curr = $j("li.viewing:last"); |
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
// --------- keyboard navigation control --------- // | |
var isinmotion = false; | |
$j(document).keydown(function(e){ | |
switch (e.keyCode) { | |
case 38: | |
//console.log("up"); | |
if (isinmotion) { | |
return false; | |
} else { | |
var curr = $j("li.viewing:last"); |
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
setTimeout( "window.location = '../yourpath/yourdestination?" + params +"';" , 3000); |
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
// On window scrolling | |
$j(window).scroll(function(){ | |
// update the ruler's color based on scroll position | |
var docHeight = $j(document).height(); | |
var scrollTop = $j(window).scrollTop(); | |
var currPos = scrollTop/docHeight*100; | |
//console.log( currPos + "%"); | |
if( (currPos > 13 && currPos < 21) || currPos > 64 ) { | |
//do something in between 13% and 21% and grater than 64% | |
} else { |
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 jqxhr = $j.ajax({ | |
type: 'post', //post or get | |
url: cartUrl, | |
//dataType: 'json', //if necessy | |
data: { product : pid, qty: 1, isAjax: 1 } // Important!! | |
}).done(function(data){ | |
//console.log(data.status); | |
if ( data.status == "SUCCESS") { | |
// do something... | |
} |
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><!-- simplified doctype works for all previous versions of HTML as well --> | |
<!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body --> | |
<!--[if lt IE 7 ]><html lang="en" class="no-js ie6"><![endif]--> | |
<!--[if (gt IE 6)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> | |
<head> | |
<!-- simplified character encoding --> | |
<meta charset="utf-8"> |
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 $j = jQuery.noConflict(); | |
$j(document).ready(function(){ | |
ms.header.init(); | |
ms.home.init(); | |
ms.footer.init(); | |
}); // end of document ready | |
/* ------------------------------------------ | |
* Project Namespace |
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
PL.maps = (function(){ | |
var map, | |
geoData; | |
var init = function(mapId,options){ | |
var div = document.getElementById(mapId); | |
map = new google.maps.Map(div, options); | |
return map; |