Skip to content

Instantly share code, notes, and snippets.

@arschmitz
Last active December 14, 2015 08:48
Show Gist options
  • Save arschmitz/5059866 to your computer and use it in GitHub Desktop.
Save arschmitz/5059866 to your computer and use it in GitHub Desktop.
_getClosest: function( e ){
var thumbx = $( this.thumb ).offset().left,
thumb2x = $( this.thumb2 ).offset().left;
if(Math.abs(e.offsetX - thumbx) < Math.abs(e.offsetX - thumb2x)){
return true;
} else {
return false;
}
},
// call console.log($( self )[ pluginName ]( "_getClosest", e));
returns dom node ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment