Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <h3>Hover over one of these jealous links!</h3>
<p>make sure you have your headphones on</p>
<div class="links-container">
  <a class="btn btn1" href="http://www.nourabusoud.com" target="_blank">
    <div class="arm">
      <div class="stick"></div>
      <div class="hand"></div>
      <div class="bone"></div>
    </div>
    <div class="btn-text">About me</div>
  </a>
  <a class="btn btn2" href="https://twitter.com/Nour_ASoud" target="_blank">
    <div class="arm">
      <div class="stick"></div>
      <div class="hand"></div>
      <div class="bone"></div>
    </div>
    <div class="btn-text">Twitter</div>
  </a>
  <a class="btn btn3" href="https://nl.linkedin.com/in/nourabusoud" target="_blank">
    <div class="arm">
      <div class="stick"></div>
      <div class="hand"></div>
      <div class="bone"></div>
    </div>
    <div class="btn-text">Linkedin</div>
  </a>
</div>
<audio controls preload="auto" id="sound-wohoo">
	<source src="https://www.nourabusoud.com/audio/wooho.mp3" controls></source>
	<source src="https://www.nourabusoud.com/audio/wooho.ogg" controls></source>
</audio>
<audio loop controls preload="auto" id="sound-me">
	<source src="https://www.nourabusoud.com/audio/me-me-me.mp3" controls></source>
	<source src="https://www.nourabusoud.com/audio/me-me-me.ogg" controls></source>
</audio>
            
          
!

CSS

            
              $btn1-color: #ff3c41;
$btn2-color: #0ebeff;
$btn3-color:#47cf73;
$stick: #3F3F3F;
$flag: #686868;

body{
  font-family: helvetica;
  font-size: 16px;
  color:#666;
  text-align:center;
  background: #fafafa;
}

h3{
  margin-top:30px;
}
.links-container{
  width: 400px;
  margin:110px auto 0;
  text-align: center;
}
.btn{
 display: inline-block;
 position: relative;
 text-decoration: none;
 margin: 0 15px;

  &-text{
    display: block;
    line-height:20px;
    padding:10px 20px;
    background-color: navy;
    color: white;
    text-align: center;
    z-index: 2;
    border-radius: 5px;
    //position: absolute;
  }
  
  &1{
    .btn-text,.bone {
      background-color: $btn1-color;
    }
    &.pick-me .arm{
      animation-delay: 0.2s;
    }
    .bone{
      &:before{
        display: none;
      }   
    }
  }
  &2{
    .btn-text,.bone {
      background-color: $btn2-color;
      &.pick-me .arm{
      animation-delay: 0.1s;
      }
    }
    .bone{
      &:before{
        display: none;
      }   
    }
  }
  &3{
    .btn-text,.bone {
      background-color: $btn3-color;
    &.pick-me .arm{
      animation-delay: 0.3s;
    }
    }
  }
}
.pick-me{
  .arm{
    display: block;
    animation: wave 0.5s alternate infinite; 
  }
}
.arm{
  position: absolute;
  top: -28px;
  left: 40px;
  visibility: hidden;
  z-index: -1;
  
  
}
.bone{
  width: 22px;
  height: 45px;
  border-radius: 3px 3px 0 0;
  
  &:before{
    content:".";
    position: absolute;
    text-align: left;
    color: #a0a0a0;
    width:22px;
    font-weight: bold;
    padding:4px 2px;
    line-height: 5px;
    top:0px;
    left: 0;
    background-color:rgba(250,250,245,0.98);
    border:1px solid #cfcfcf;
    box-sizing: border-box;
  }
}

.hand{
  position: absolute;
  width:21px;
  height: 25px;
  top:-24px;
  left:1px;
  background-color: #ffe0bd;
  border:1px solid #E2B783;
  border-radius:10px 10px 5px 14px;
  transform: rotate(35deg);
  z-index:-2;
  
  &:after, &:before{
    content: "";
    border:1px solid #E2B783;
    position: absolute;
    background-color:#ffe0bd;
    border-bottom:0;
    border-radius: 5px 5px 0 0;
    height: 10px;
    width: 4px;
    top: -1px;
  }
  &:before{
    left:2px;
    }
  &:after{
    left:12px;
  }
}

.stick{
  width:10px;
  height: 30px;
  top: -30px;
  left:5px;
  background: $stick;
  position: absolute;
  z-index:-3;
  transform: rotate(-50deg);
  
  &:after{
    content:"ME!";
    color: white;
    text-align: center;
    padding:5px 8px;
    position: absolute;
    top:-30px;
    left: 0;
    height:20px;
    color: #fff;
    border-radius: 2px 2px px 0;
    background: $flag;
  }
}
.yeay{
  &:before{
    content:"Woohoo!";
    position: absolute;
    top: -14px;
    left: 15px;
    animation: wohoo 1s infinite ease-in-out;
    visibility: hidden;
    background: -webkit-linear-gradient(-180deg, red, blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  }
}
@keyframes wave{
  0% {
    visibility: hidden;
    transform: rotate(-20deg);
    top: -26px;  
  }
  100%{
    visibility: visible;
    transform: rotate(20deg);
  }
}

@keyframes wohoo{
  0% {
    visibility: hidden; 
  }
  25%{
    visibility: visible;
    transform: scale(1.4);
    top:-60px;
  }
  75%{
    visibility: visible;
    transform: scale(1.8);
    top:-60px;
  }
  100%{
    visibility: hidden; 
    top:-70px;
    opacity: 0;
  }
}

audio{
  display:none;
}
            
          
!

JS

            
              var jealousButton = document.getElementsByClassName("btn");
var wohooSound = document.getElementById("sound-wohoo");
var meSound = document.getElementById("sound-me");

var getSiblings = function (elem) {
  var siblings = [];
  var sibling = elem.parentNode.firstChild;
  for (; sibling; sibling = sibling.nextSibling) {
    if (sibling.nodeType !== 1 || sibling === elem) continue;
    siblings.push(sibling);
  }
  return siblings;
};

for (var i = 0; i < jealousButton.length; i++) {

  jealousButton[i].addEventListener("mouseover", function(event) { 
    wohooSound.play();  
    meSound.play();
    this.classList.add("yeay");

    var siblings = getSiblings(this);
    for (var i = 0; i < siblings.length; i++) {
      siblings[i].classList.add("pick-me");
    }
  }, false);


  jealousButton[i].addEventListener("mouseleave", function(event) {   
    wohooSound.pause();  
    wohooSound.currentTime = 0;
    meSound.pause();
    meSoundcurrentTime = 0;
    event.target.classList.remove("yeay");

    for (var i = 0; i < jealousButton.length; i++) {
      jealousButton[i].classList.remove("pick-me");
      jealousButton[i].classList.remove("yeay");
    }
  }, false);

}

//  JQUERY CODE
// $(".btn" ).mouseover(function() {
//   $("#sound-wohoo")[0].play();
//   $("#sound-me")[0].play();
//   $(this).addClass("yeay");
//  $(this).siblings().addClass("pick-me");
//   $(this).siblings().children( ".hand" ).css( "display", "block" );
// });

// $(".btn" ).mouseout(function() {
//   $("#sound-woohoo")[0].pause();
//   $("#sound-me")[0].pause();
//   $(this).removeClass("yeay");
//    $(".btn").removeClass("pick-me");
// });

            
          
!
999px

Console