Skip to content

Instantly share code, notes, and snippets.

View rlmcneary2's full-sized avatar
🦕

Rich McNeary rlmcneary2

🦕
  • New York
View GitHub Profile
@rlmcneary2
rlmcneary2 / fiddle.js
Last active December 6, 2020 19:48
Demonstrate use of jQuery $.ajax with an array of jqXHR Deferred Promise objects passed to the $.when function.
// Seeing this through jsfiddle?
// Get the source from github gist: https://gist.github.com/1873879
// Create an array with two jqXHR objects from two separate $.ajax calls.
var arrJqx = [];
// This call has no delay and the response will come back from the server
// almost immediately.
arrJqx.push($.ajax ({
url: "/echo/json/",
@rlmcneary2
rlmcneary2 / menu.css
Created November 26, 2011 22:22
Javascript menu with animated pointer and flag
@CHARSET "ISO-8859-1";
#menu {color:black;background-color:white;}
#menuBar {position:relative;top:-10px;left:0px;width:100%;height:30px;}
#pointer {position:relative;top:-18px;width:20px;height:20px;margin-left:auto;margin-right:auto;background-color:#8BBAE5;-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);}
#menuBarLower {position:relative;top:-10px;left:0px;width:100%;height:10px;background-color:#8BBAE5;}
#selectorOuter {position:relative;top:4px;width:20px;height:20px;margin-left:auto;margin-right:auto;background-color:#8BBAE5;-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);}
#selectorInner {position:relative;top:-12px;width:20px;height:20px;margin-left:auto;margin-right:auto;background-color:#FFFFFF;-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform: