Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rmanalan/635490 to your computer and use it in GitHub Desktop.
Save rmanalan/635490 to your computer and use it in GitHub Desktop.
Replace the both() function with the one below:
function both( val ){
if(typeof val == 'object') {
return val;
} else if(typeof val == 'function') {
var val = val();
return typeof val == 'object' ? val : { top: val, left:val };
} else {
return typeof val == 'object' ? val : { top:val, left:val };
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment