Skip to content

Instantly share code, notes, and snippets.

@charandas
Created December 3, 2014 23:12
Show Gist options
  • Select an option

  • Save charandas/1ee7d0d812e37bbe80b1 to your computer and use it in GitHub Desktop.

Select an option

Save charandas/1ee7d0d812e37bbe80b1 to your computer and use it in GitHub Desktop.
click-copy.js
// Given element is an array of jquery elements
var rect = element[0].getBoundingClientRect();
console.dir(rect);
// NOTE: this is how a click can be copy-played again
$(document.elementFromPoint(rect.left, rect.top)).click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment