This file contains hidden or 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
$("body").click(function(e){ | |
if(e.target.className !== "foo"){ | |
$(".foo").hide(); | |
} | |
} | |
); |
This file contains hidden or 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
//this 100% isnt accurate due to android browser unreliably reporting width.. use at your own risk | |
// Note - requires Modernizr touch detection build | |
if (Modernizr.touch && window.innerWidth < 768) { | |
// mobile user (if a touch screen and the window is smaller than tablet sized) | |
alert('Mobile Phone'); | |
} | |
else { | |
alert('Desktop or Tablet Browser'); |
This file contains hidden or 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 shortenLink(){ | |
var screenWidth = $(window).width(); | |
var f = function(){ | |
var linkTextURL = $(this).text(); | |
if (screenWidth < 450) linkTextURL = linkTextURL.substring(0,40) + "..."; | |
$(this).text(linkTextURL); | |
} | |
$('a.resultLink').each(f); |
This file contains hidden or 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
// Allows sliders to be dynamically initiated more easily | |
// Adds validation for min and max number input boxes | |
// Minimizes code if many sliders are on a page | |
var searchSlider = { | |
init: function(selector, range_min, range_max){ | |
var input_min = $(selector).parents('.slider-wrapper').find('.min'), | |
input_max = $(selector).parents('.slider-wrapper').find('.max'); |
This file contains hidden or 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
// This is a chart loading module to simply initializing charts that use a custom API to populate the data tables | |
google.load('visualization', '1', {'packages': ['corechart','geochart']}); | |
google.setOnLoadCallback(function(){ | |
coCharts.init(); | |
}); | |
var coCharts = (function(){ | |
var colors = { |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
/* ---------------------------------------------------- | |
${1:Message text...} | |
---------------------------------------------------- */ |
This file contains hidden or 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
/* | |
Copyright (c) 2011 Damien Antipa, http://www.nethead.at/, http://damien.antipa.at | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
This file contains hidden or 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
myArray.sort(function(a,b){ | |
return a.propertyName - b.propertyName; | |
}); |
This file contains hidden or 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
Blake: Hi, my name is Blake. How may I help you? | |
Bill Spingarn: I ordered a hard drive that I didn't end up needing, but it's past 30 days. I was wondering if I could still return it for a store credit. | |
Bill Spingarn: Invoice #98272107 | |
Blake: Hi Bill, I am happy to assist you with that. May I please have a moment to look into this for you? | |
Bill Spingarn: It was purchased just last month, 2/18 | |
Bill Spingarn: sure | |
Blake: Thank you for holding. We are sorry for the unfavorable situation. The item is beyond our warranty for 6 days, and it can no longer be returned to us. However, you can still contact the manufacturer of the item for direct warranty support. Their contact information is 1-800-726-7864. | |
Bill Spingarn: I don't need warranty support. I haven't even used it. I can't believe there is nothing you guys can do. | |
Blake: Is it unopened? | |
Bill Spingarn: It was just a bare hard drive |
This file contains hidden or 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
.rotating { | |
-webkit-animation: rotating 2s linear infinite; | |
-moz-animation: rotating 2s linear infinite; | |
-ms-animation: rotating 1s linear infinite; | |
} | |
@-webkit-keyframes rotating { | |
from{ | |
-webkit-transform: rotate(360deg); | |
-webkit-transform-origin: 50% 50%; |
OlderNewer