Skip to content

Instantly share code, notes, and snippets.

@tmslnz
Created February 25, 2017 15:03
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tmslnz/bb087966001d52b169e7ec54e99ba720 to your computer and use it in GitHub Desktop.
Save tmslnz/bb087966001d52b169e7ec54e99ba720 to your computer and use it in GitHub Desktop.
Get and array of translate3d values
function getTranslate3d (el) {
var values = el.style.transform.split(/\w+\(|\);?/);
if (!values[1] || !values[1].length) {
return [];
}
return values[1].split(/,\s?/g);
}
@maximilliangeorge
Copy link

Thanks a lot

@irisHanb
Copy link

irisHanb commented Oct 6, 2019

Thanks a lot ^^

@silvaotavio1
Copy link

Thanks a lot. ³

@hendra0ma
Copy link

thanks a lot bruh, u saved my life . i love u <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment