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
/* | |
http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ |
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
/* | |
* http://stackoverflow.com/questions/8271493/css-media-query-to-target-ipad-and-ipad-only | |
*/ | |
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait) { | |
.ipad-portrait { color: red; } /* your css rules for ipad portrait */ | |
} | |
@media all and (device-width: 768px) and (device-height: 1024px) and (orientation:landscape) { | |
.ipad-landscape { color: blue; } /* your css rules for ipad landscape */ | |
} |
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
/* http://www.456bereastreet.com/archive/201210/how_to_line_wrap_text_in_legend_elements_even_in_ie/ */ | |
legend { | |
display:table; /* Enable line-wrapping in IE8+ */ | |
white-space:normal; /* Enable line-wrapping in old versions of some other browsers */ | |
} |
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
setTimeout(function(){ | |
$(MapNode).find('div[title="Show street map"], div[title="Show street map | |
with terrain"], div[title="Show satellite imagery"], div[title="Zoom in to | |
show 45 degree view"], div[title="Show imagery with street names"], | |
div[title="Pan up"], div[title="Pan down"], div[title="Pan left"], | |
div[title="Pan right"], div[title="Return to the last result"], | |
div[title="Zoom in"], div[title="Zoom out"], img[title="Rotate map 90 | |
degrees"]').each(function(i, o){ | |
$(o).attr({ | |
role: 'button', |
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
var i, len = titles.length; | |
for(i = len-1; i >- 1; i--){ | |
} |
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
// http://stackoverflow.com/questions/1232040/how-to-empty-an-array-in-javascript | |
// related: Splicing is the worst by far: http://jsperf.com/emptying-arrays/4 | |
matrix.splice(0,matrix.length); |
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
// http://stackoverflow.com/questions/5016313/how-to-determine-if-a-number-is-odd-in-javascript | |
function oddOrEven(x) { | |
return ( x & 1 ) ? "odd" : "even"; | |
} |
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
// http://www.yeikos.com/2013/01/javascript-tips-cadena-aleatoria.html | |
Math.random().toString(36).substring(2); // 9xfq8ssn2hjjor |
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 Stack(stackLimit) | |
{ | |
this.stack = new Array(); | |
this.stackLimit = stackLimit; | |
} | |
Stack.prototype.isEmpty = function() | |
{ | |
return (this.stack.length == 0); | |
} |
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 controlHeight(elems, num){ | |
var len = elems.length; | |
if(len !== 0){ | |
for(var i = 0; i < len; i+=num) { | |
var divs = elems.slice(i, i+num), | |
height, numArray = []; | |
for(var j = 0; j < num; j++){ | |
numArray.push(divs.eq(j).height()); | |
} | |
height = Math.max.apply(null, numArray); |