Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="wrapper">
  <svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   version="1.1"
   id="svg22537"
   viewBox="0 0 356.42771 355.46908"
   height="355.46906"
   width="356.4277">
      <defs
     id="defs22539">
    <linearGradient
       xlink:href="#linearGradient28097"
       id="linearGradient28155"
       gradientUnits="userSpaceOnUse"
       gradientTransform="matrix(-0.11600435,0.30635205,-0.73739036,-0.27922284,618.29012,339.30282)"
       x1="-565.32062"
       y1="90.328613"
       x2="177.87857"
       y2="870.43488" />
    <linearGradient
       id="linearGradient28097">
      <stop
         style="stop-color:#ffffff;stop-opacity:1;"
         offset="0"
         id="stop28099" />
      <stop
         style="stop-color:#ffffff;stop-opacity:0;"
         offset="1"
         id="stop28101" />
    </linearGradient>
  </defs>
    <g
     transform="translate(-47.798516,158.47132)"
     id="layer1">
    <g
       id="left-humerous"
       transform="matrix(-0.04457109,-0.24096105,0.24096105,-0.04457109,192.17597,37.057232)">
      <path
         style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#aa0000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
         d="M -20.092034,95.417753 C -55.430614,139.55014 -69.670724,171.8997 -24.127654,284.52519 42.494796,449.27873 278.58126,423.1599 315.73899,373.63589 349.68715,328.38948 351.51689,251.5041 258.91144,174.64375 166.30589,97.783483 15.852036,51.27427 -19.843864,95.110313"
         id="path28049" />
      <path
         style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient28155);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:27.10491753;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
         d="M 115.25728,281.04533 C -24.098014,245.22536 -1.0327645,216.03728 12.229416,166.50429 c 8.88583,-33.18776 7.09791,-83.64277 155.042074,-22.82158 136.84188,56.25696 141.5797,118.65207 142.58421,148.56779 1.21505,36.18476 -31.59349,30.69372 -194.59842,-11.20517 z"
         id="path28153" />
    </g>
    <path
       style="color:#000000;clip-rule:nonzero;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#aa0000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:6.07101202;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
       d="m 172.26751,27.695382 c 30.83883,-47.148897 64.34509,-6.9785 58.22742,19.11759 -3.9722,16.9442 -26.82028,22.5117 -53.13478,29.8087 -26.31452,7.297 -50.23492,9.1736 -49.36633,-2.1183 0.9701,-11.32 29.4631,-24.1643 44.27369,-46.80799 z"
       id="left-forearm-4" />
  </g>
  </svg>
  <button id="humerous-up">Order +</button>
  <button id="humerous-down">Order -</button>
  <button id="go-left">Go Left</button>
  <button id="go-right">Go Right</button>
</div>


              
            
!

CSS

              
                


              
            
!

JS

              
                $("#humerous-up").on("click", function() {
  var clone = $("#left-humerous"); //.clone();
  //$("#left-humerous").remove();
  $("#layer1").append(clone);
});
$("#humerous-down").on("click", function() {
  var clone = $("#left-humerous"); //.clone();
  //$("#left-humerous").remove();
  $("#layer1").prepend(clone);
});
$("#go-left").on("click", function() {
  TweenMax.to("#left-humerous", 1, {
    transform: fixMatrix($("#left-humerous")[0], "matrix(-0.13565154,-0.20407712,0.20407712,-0.13565154,196.65984,46.171163)")
  });

});
$("#go-right").on("click", function() {
  TweenMax.to("#left-humerous", 1, {
    transform: fixMatrix($("#left-humerous")[0], "matrix(-0.04457109,-0.24096105,0.24096105,-0.04457109,192.17597,37.057232)")
  });
})

function fixMatrix(element, matrix) {
  var version = CSSPlugin.version.split("."),
    m = matrix.match(/(?:(-|\+)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig);
  var transform;
  try {
    transform = element._gsTransform;
  } catch (e) {

  }
  console.log(transform);
  if (m.length !== 6 || +version[0] > 2 || +version[1] > 18 || +version[2] > 2) { //skip the "fix" if an updated CSSPlugin is already loaded.        
    return matrix;
  }
  if (!transform) {
    TweenLite.set(element, {
      x: "+=0"
    }); //forces creation and population of the _gsTransform object

    transform = element._gsTransform;

  }
  m[4] -= (transform.xOrigin - (transform.xOrigin * m[0] + transform.yOrigin * m[2]) + transform.xOffset);
  m[5] -= (transform.yOrigin - (transform.xOrigin * m[1] + transform.yOrigin * m[3]) + transform.yOffset);
  return "matrix(" + m.join(",") + ")";
}
              
            
!
999px

Console