Pen Settings



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


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


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.


Save Automatically?

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.


                <div class="floater-wrapper">
	<div class="floater">
		Here is some text in a floater.
<h2>Two examples of GSAP TimelineMax in action</h2>
<p>Open the console then click on the Squish button or the floating footer a few times.</p>
<p>Why does <b>resetTL()</b> think the first parameter is undefined ("Cannot read property 'progress' of undefined")? Note the string parameter - which I have included for reference - is working as expected, as you can see from the console.log output.</p>
 <section class="div_morphs">
	 	<button type="button" id="squish">Squish</button>
	 <div class="outer">



                body {
  margin: 30px;
  font-family: sans-serif;
  background-color: grey;
  position: relative;

table {
  background-color: white;
  border-collapse: collapse;

td, th {
  border: 1px solid black;
  padding: 5px 8px;

.outer {
  overflow: hidden;

.floater-wrapper {
  left: 0;
  right: 0;
  top: 0;
  position: fixed;
  bottom: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 9;

.floater {
  position: absolute;
  background-color: lightgrey;
  padding: 15px 17px;
  box-sizing: border-box;
  width: 100%;
  bottom: 0;
  pointer-events: auto;
  cursor: pointer;

.floater:hover {
  background-color: green;
  color: white;



                // // For the table squish
var tl4 = new TimelineMax({ paused: true });
var tl5 = new TimelineMax({ paused: true });
var lastPlayed = null;

var tbl = $(".outer table");
tbl.attr("original_height", tbl.outerHeight());
tbl.attr("final_height", tbl.find("thead").outerHeight());
  { height: tbl.attr("final_height"), ease: Bounce.easeOut },
  { height: tbl.attr("original_height"), ease: Bounce.easeOut },

$("#squish").on("click", function(e) {
  if (tl4.isActive() || tl5.isActive()) {

  if (lastPlayed !== tl4) {
    lastPlayed = tl4;;
  } else {
    lastPlayed = tl5;;