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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                 <div class="exemple">
       
 </div>
<div class="rec">click</div>
<div class="message">I want to stop hover animations, while this message shows, right now it is in the hover state ( with the scale on ), I need it off, I do not know how .. Dbl click, brings it back</div>
              
            
!

CSS

              
                body {
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.exemple {
  
  position: relative;
  width: 100%;
  height: 100vh;
  border-radius: 100vw;
  background-color: rgb(222, 222, 222);
}
.rec {
  position: absolute;
  width: 200px;
  text-align: center;
  line-Height: 49px;
  height: 50px;
  filter: blur(0px);
  -webkit-filter: blur(0px);
  background: grey;
  top: calc(50vh - 25px);
  left: calc(50vw - 100px);
  border-radius: 2vw;
  cursor: pointer;
  font-weight: 100;
  
}

.message {
  font-family: sans-serif;
  position: fixed;
  filter: blur(0px);
  -webkit-filter: blur(0px);
  top: 30%;
  opacity: 1;
  left: 14vw;
}
              
            
!

JS

              
                var rec = $('.rec');
$(function() {
  var flag = true;
  var counter = 0;
  var tl = hoverRec();  ///the hover  tl
  var tl2 = cliRec();  //the click  tl2

  rec.hover(function() {
    if (flag === true) {
      tl.play().timeScale(1.21);
    }
  }, function() {
    if (flag === true) {
      tl.reverse().timeScale(2);
    }
  });

rec.on('click', function() {
    flag = false;
  if(counter === 0){
    tl.reverse();
    tl2.play().timeScale(1);
}
  }).on('click', function() {
     if (flag === false && counter == 1) {
       tl2.reverse().timeScale(2);
 } 
  // tl.reverse().pause();
  });
  
function comp(){
  flag = true;
  counter = counter -1;
}
  function add(){
   console.log(counter)  
  counter = counter + 1;
}
   function enleve(){
    console.log(counter)  
  //counter = counter - 1;
} 

function hoverRec() {
  var tl = new TimelineMax({
    paused: true
  });
   tl.to(rec, 0.5, {
    scale: 1.4,
    ease: Back.easeInOut
  });
  tl.to('.exemple', 0.5, {
    css: {
      filter: 'blur(30px)',
      '-webkit-filter': 'blur(30px)', 
      backgroundColor: 'rgb(0, 0, 005)',
       scale: 0.2,
    opacity: 0.1,
    }
    
    //css: {background: 'black'},
    
  //  ease: Back.easeInOut
  });
  return tl;
}

function cliRec() {
  var tl2 = new TimelineMax({
    paused: true,
    onStart: add,
    onReverseComplete: comp
  });
  tl2.to(rec, 3, {
    x: 200,
    ease: Back.easeOut
  });
  tl2.from('.message', 1, {
   
    css: {
      filter: 'blur(15px)',
     '-webkit-filter': 'blur(15px)', 
       scale: 14,
    opacity: 0,
    },
    
    ease: Power4.easeInOut
  },'-=3');
  return tl2;
}
  }());

TweenMax.ticker.fps(60);
              
            
!
999px

Console