Snippets Collections
$("button").click(function(){
  $("div").animate({
    left: '250px',
    opacity: '0.5',
    height: '150px',
    width: '150px'
  });
}); 
$("button").click(function(){
  $("p").hide(1000);
});
#eut-header .eut-horizontal-menu.eut-arrow ul.eut-menu .menu-item-has-children > a {
    padding-right: 0.3em;
}


.pattern {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100% !important;
    top: 0;
    left: 0;
    background: url(/wp-content/uploads/2020/09/4x4-pattern.png) repeat;
        background-attachment: scroll;
    background-attachment: fixed;
}
/* The animation code */
@-webkit-keyframes SectionBackgroundAnimation {
 0% {
  background-position:0% 50%
 }
 50% {
  background-position:100% 50%
 }
 100% {
  background-position:0% 50%
 }
}
@-moz-keyframes SectionBackgroundAnimation {
 0% {
  background-position:0% 50%
 }
 50% {
  background-position:100% 50%
 }
 100% {
  background-position:0% 50%
 }
}
@keyframes SectionBackgroundAnimation {
 0% {
  background-position:0% 50%;
 }
 50% {
  background-position:100% 50%
 }
 100% {
  background-position:0% 50%
 }
}
.eut-breadcrumbs {
    background: linear-gradient(45deg,#8f96a6 0%,#d9731a 35%,#8f96a6 50%,#8f96a6 75%,#8f96a6 100%);
    background-size: auto;
    background-size: 400% 400% !important;
    -webkit-animation: SectionBackgroundAnimation 15s ease infinite;
    -moz-animation: SectionBackgroundAnimation 15s ease infinite;
    animation: SectionBackgroundAnimation 15s ease infinite;
    border-radius: 0px;
    margin: 0px;
    text-transform: uppercase;
    font-size: 12px;
}
.eut-breadcrumbs.eut-fullwidth {
    padding: 6px 20px;
}
.eut-menu-type-button > a .eut-item {
    background: linear-gradient(45deg,#8f96a6 0%,#d9731a 35%,#8f96a6 50%,#8f96a6 75%,#8f96a6 100%);
        background-size: auto;
    background-size: 400% 400% !important;
    -webkit-animation: SectionBackgroundAnimation 15s ease infinite;
    -moz-animation: SectionBackgroundAnimation 15s ease infinite;
    animation: SectionBackgroundAnimation 15s ease infinite;
    padding: 12px 15px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
}

#eut-feature-section {
    top: 0px;
    margin-bottom: 0px;
}
// Color Animated Announcement Bar //

[data-header-theme] .sqs-announcement-bar-dropzone .sqs-announcement-bar {
  background: linear-gradient(99deg,#0d7d88,#708090,#add8e6);
  background-size: 400% 400%;
  -webkit-animation: AnimationName 6s ease infinite;
  -moz-animation: AnimationName 6s ease infinite;
  animation: AnimationName 6s ease infinite;
}

// Animation Keyframes - Do Not Edit or Delete //

@-webkit-keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@-moz-keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@keyframes AnimationName { 0% { background-position: 0% 51% } 50% { background-position: 100% 50% } 100% { background-position: 0% 51% } }

@-webkit-keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }

@-moz-keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }

@keyframes AnimationName { 0% { background-position: 0% 49% } 50% { background-position: 100% 52% } 100% { background-position: 0% 49% } }
/*CSS*/
.text__underline {
    transform: translateX(-300%);
    transition: 0.7s;
}
.header__nav-button {
    max-width: fit-content;
    overflow: hidden;
}
.header__nav-button:hover .text__underline {
    animation: toMiddlePos 0.7s;
    transform: translateX(0);
    opacity: 100%;
}
.header__nav-button:not(:hover) .text__underline {
    transform: translateX(300%);
    opacity: 0;
}
@keyframes toMiddlePos {
    from {
        transform: translateX(-300%);
    }
    to {
        transform: translateX(0);
    }
}
/*CSS*/

/*HTML markup*/
<a class="button header__nav-button">
  <span>Your text</span>
  <div class="content-list-item__line line-primary text__underline line__black" style="width: 0%; 	display: block; height: 1px;" />
</a>
/*HTML markup*/
<style>
 .spacer {
  height: 100vh;
}

a {
  color: #3d3d3d;
  font-family: Arial, Helvetica, sans-serif;
}
/* The magic one liner that allows for smooth scrolls */
html {
  scroll-behavior: smooth;
}

  /* Removes the animation for users that don't prefer it */
@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
  
 </style>

<h1 id="top"><a href="#middle">Let's go to the middle of the page</a></h1> 

<div class="spacer">
  &nbsp;
</div>

<h1 id="middle"><a href="#bottom">Go to the bottom?</a></h1>

<div class="spacer">
  &nbsp;
</div>

<h1 id="bottom"><a href="#top">Nah, let's go back to the top</a></h1>
[su_animate type="bounceIn" duration="1"]Animated content[/su_animate]
JQUERY
function whichAnimationEvent(){
  var t,
      el = document.createElement("fakeelement");

  var animations = {
    "animation"      : "animationend",
    "OAnimation"     : "oAnimationEnd",
    "MozAnimation"   : "animationend",
    "WebkitAnimation": "webkitAnimationEnd"
  }

  for (t in animations){
    if (el.style[t] !== undefined){
      return animations[t];
    }
  }
}

var animationEvent = whichAnimationEvent();

$(".button").click(function(){
  $(this).addClass("animate");
  $(this).one(animationEvent,
              function(event) {
    // Do something when the animation ends
  });
});

/****************************/

JS ONLY
var button = document.querySelector(".button"),
    transitionEvent = whichTransitionEvent();

button.addEventListener("click", function() {
  if (button.classList) {
    button.classList.add("animate");
  } else {
    button.className += " " + "animate";
  }

  button.addEventListener(transitionEvent, customFunction);
});

function customFunction(event) {
  button.removeEventListener(transitionEvent, customFunction);

  // Do something when the transition ends
}
$('.button').click(function(){

  var buttonId = $(this).attr('id');

  $('#modal-container').removeAttr('class').addClass(buttonId);

  $('body').addClass('modal-active');

})

​

$('#modal-container').click(function(){

  $(this).addClass('out');

  $('body').removeClass('modal-active');

});
star

Mon Dec 18 2023 08:32:38 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/jquery/jquery_animate.asp

#animation #jqueryanimation #slidinganimation
star

Mon Dec 18 2023 03:45:50 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/jquery/jquery_hide_show.asp

#hide #animation #hideanimation
star

Tue Dec 05 2023 07:39:43 GMT+0000 (Coordinated Universal Time) https://codepen.io/jh3y/pen/XWOodoP

#css #scroll #animation
star

Wed Oct 25 2023 06:34:21 GMT+0000 (Coordinated Universal Time) https://www.bram.us/2023/10/23/css-scroll-detection/

#css #scroll #animation
star

Sun Apr 16 2023 12:05:49 GMT+0000 (Coordinated Universal Time) https://www.sea.ma/wp-admin/admin.php?page

#btn #bg #animation
star

Wed Apr 20 2022 13:24:40 GMT+0000 (Coordinated Universal Time) https://www.ghostplugins.com/steps/color-animated-announcement-bar

#announcement #bar #animation #colour
star

Sun Mar 20 2022 17:48:21 GMT+0000 (Coordinated Universal Time) https://agency-website-c0d1e7.webflow.io/

#css #animation #text-underline
star

Wed Feb 23 2022 17:11:51 GMT+0000 (Coordinated Universal Time) https://gomakethings.com/smooth-scrolling-links-with-only-css/

#html #css #scroll #animation
star

Sat Feb 19 2022 13:04:13 GMT+0000 (Coordinated Universal Time) https://javascript.plainenglish.io/animate-when-element-is-in-view-with-framer-motion-63b254403bf

#react #animation
star

Sat Jan 08 2022 08:24:30 GMT+0000 (Coordinated Universal Time) https://getshortcodes.com/docs/animation/

#animation #snippet
star

Wed Jan 20 2021 17:02:01 GMT+0000 (Coordinated Universal Time)

#transition #animation
star

Thu Dec 24 2020 05:24:43 GMT+0000 (Coordinated Universal Time) https://codepen.io/designcouch/pen/obvKxm

#js #modal #animation

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension