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 () | |
{ | |
if (!Function.prototype.inherit) | |
{ | |
Function.prototype.inherit = function (p_parent) | |
{ | |
if (p_parent.constructor == Function) | |
{ | |
// Normal Inheritance | |
this.prototype = new p_parent(); |
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
/*=========== Touch support detection ===========*/ | |
(function detect_touch_support(){ | |
if ("ontouchend" in document) { | |
$('html').addClass('touch'); | |
} else { | |
$('html').addClass('no-touch'); | |
} | |
}()); |
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
/*global pageYOffset:false */ | |
/*=========== Force Scroll to Top ===========*/ | |
var userHasNotScrolled = true; | |
$(window).on('touchmove', function(e) { | |
userHasNotScrolled = false; | |
}); | |
if(/mobi/i.test(navigator.userAgent) && !location.hash) | |
{ | |
setTimeout(function () { |
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
/*global $:false */ | |
/*global FB:false */ | |
function postToFeed(sourceObj) { | |
// using code from https://developers.facebook.com/docs/reference/dialogs/feed/ | |
// calling the API ... | |
var obj = { | |
method: 'feed', |
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
// from http://forrst.com/posts/SASS_px_to_em_and_em_to_px-JAd | |
// Convert px to em | |
@function pxtoem($target, $context){ | |
@return ($target/$context)+0em; | |
} |
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
// Check character count and limit input field | |
// ------------------------------------------- | |
// Original from: http://www.9lessons.info/2010/04/live-character-count-meter-with-jquery.html | |
// | |
$("#tweetBox").on('keyup',function() | |
{ | |
var box=$(this).val(); | |
var limit= 140 | |
var count= limit - box.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 ($, window, document, undefined) { | |
$(function(){ | |
// ios6 scroll issue fix | |
$(document).on('scroll', function () { | |
// trigger touch event | |
$(document).trigger('touchend'); | |
}); | |
}); |