Skip to content

Instantly share code, notes, and snippets.

@rmanalan
rmanalan / jquery.scrollTo.mod-to-support-dyn-offsets.js
Created October 20, 2010 00:15
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 };
}
};