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 your number is 534, and you want it to return 534th, | |
* Use it like so: | |
* Suffix.init(534); | |
**/ | |
Suffix: { | |
init: function(theNum) { | |
var self = this, | |
toCheck, | |
theSuffix; |
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
/** | |
* @param etaTime Integer | |
* @param etaScope String | |
* @param True/False/Boolean | |
**/ | |
function calculateDuration(etaTime, etaScope, humanize) { | |
if (typeof etaTime !== 'number') { | |
etaTime = parseInt(etaTime, 10); | |
} |
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
$.fn.preload = function() { | |
this.each(function() { | |
$('<img/>')[0].src = this; | |
}); | |
}; |
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
$('#spinner').ajaxStart(function() { | |
$(this).fadeIn(); | |
}).ajaxStop(function() { | |
$(this).fadeOut(); | |
}); |
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
@import "compass/reset"; | |
@import "compass"; | |
@import "compass/css3"; | |
@mixin breakpoint($point: '') { | |
@if $point == iPab { | |
/* iPads (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { | |
@content; | |
} |
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
<?php | |
$name = (isset($_REQUEST['name']) && !empty($_REQUEST['name'])) ? $_REQUEST['name']: null; | |
$temp_email = (isset($_REQUEST['email']) && !empty($_REQUEST['email'])) ? $_REQUEST['email']: null; | |
/* server side email address validation */ | |
$email = (filter_var($temp_email, FILTER_VALIDATE_EMAIL)) ? $temp_email: null; | |
$subject = (isset($_REQUEST['subject']) && !empty($_REQUEST['subject'])) ? $_REQUEST['subject']: null; |
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 App = { | |
init: function(online) { | |
var self = this; | |
if (!online) { | |
alert('not connected'); | |
} | |
} | |
}; | |
$(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
if (window.navigator.geolocation) { | |
var accuracyThreshold = 100, | |
timeout = 10 * 1000, | |
watchID = navigator.geolocation.watchPosition(function(position) { | |
$('#latitude').val(position.coords.latitude); // set your latitude value here | |
$('#longitude').val(position.coords.longitude); // set your longitude value here | |
// if the returned distance accuracy is less than your pre-defined accuracy threshold, | |
// then clear the timeout below and also clear the watchPosition to prevent it from running continuously |
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
// $mq-mobile-portrait : 320px !default; | |
// $mq-mobile-landscape : 480px !default; | |
// $mq-tablet-portrait : 640px !default; -- changed because i want my blog content is around this wide, not 768. you should let content & design determine your breakpoints | |
// $mq-tablet-landscape : 1024px !default; | |
// $mq-desktop : 1382px !default; | |
$mq-mobile-portrait : 20em !default; | |
$mq-mobile-landscape : 30em !default; | |
$mq-tablet-portrait : 40em !default; | |
$mq-tablet-landscape : 64em !default; |
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
data-pattern="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])" |
OlderNewer