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.


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.


                <h1>Moving Tooltips on anything.</h1> 
<h2>Very light on the JS</h2>

<div class="wrapper">
    <a href="" class="tooltipLink" data-tooltip="I am an HTML link!">I'm a hyperlink</a>
    <p class="tooltipLink" data-tooltip="I am a P tag!"> <strong>A Paragraph</strong><br><br>space Anna Sale creates on the WNYC podcast Death, Sex, and Money. Her show is, in this moment, powerful; the empathy she extends to her guests feels real and deep; the conversations</p>

    <input type="text" class="tooltipLink" data-tooltip="Type something, foo!" value="text input"></input>

<button type="text" class="tooltipLink" data-tooltip="I am a Button!">Button</button>

    <img class="tooltipLink" data-tooltip="You disgust me. Meh!" src="">


                .tooltip {
    transform: translate(-50%, -200%);
    display: none;
    position: absolute;
    color: #F0B015;
    background-color: #000;
    border: none;
    border-radius: 4px;
    padding: 15px 10px;
    z-index: 10;
    display: block;
    width: 100%;
    max-width: 200px;
    top: 0;
    left: 50%;
    text-align: center;

.tooltip:after {
    content: "";
    display: block;
    position: absolute;
    border-color: rgba(0, 0, 0, 1) rgba(0, 0, 0, 0);
    border-style: solid;
    border-width: 15px 15px 0;
    bottom: -13px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 0;

/* ----------------------- Display ------------------------ */

* { box-sizing: border-box; }

body {
    font-family: "Quicksand", sans-serif;
    text-align: center;
    padding: 20px 50px 0;
    background: #222;
    color: #eee;
    height: 100vh;

.wrapper {
    margin: 100px auto;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: flex-start;
/*     overflow: auto; */

.wrapper > * {
    margin-bottom: 100px;
    flex-shrink: 0;
    max-width: 300px;

img {max-width: 300px;}

hr {
  max-width: 100px;
  margin: 30px auto 0;
  border-bottom: 1px solid #444;

h1 {
    color: #F0B015;
  font-size: 2em;

a {
    color: #eee;

input {
  text-align: left;




$('.tooltipLink').hover(function () {
     var title = $(this).attr('data-tooltip');
     $(this).data('tipText', title);
     if(title == ''){}
        $('<p class="tooltip"></p>').fadeIn(200).text(title).appendTo('body');
 }, function () {
     $(this).attr('data-tooltip', $(this).data('tipText'));
 }).mousemove(function (e) {
     var mousex = e.pageX;
     var mousey = e.pageY;
         top: mousey,
         left: mousex