Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created June 10, 2012 21:21
Show Gist options
  • Save brentsowers1/2907372 to your computer and use it in GitHub Desktop.
Save brentsowers1/2907372 to your computer and use it in GitHub Desktop.
jQuery attachment types common code
// Used for measuring performance
var clickStartTime;
function callbackFunction() {
var doneDate = new Date();
var diff = doneDate.getTime() - clickStartTime.getTime();
alert("It took " + diff + " ms");
return false;
}
$("#container").mousedown(function() {
clickStartTime = new Date();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment