jquery-accessible-hide-show-aria icon indicating copy to clipboard operation
jquery-accessible-hide-show-aria copied to clipboard

Handle appearance and no-js without setTimeout

Open ffoodd opened this issue 7 years ago • 0 comments

Related to #9 I think we can find a better way to handle this case, depending on the browser compatibility you want.

You may hide content from the beginning, as a default state, then trigger an animation on .no-js class:

@keyframes no-js {
  to {
    transform: none;
    transition-delay: 50ms, 0ms;
    visibility: visible;
  }
}

js-to_expand {
visibility: hidden;
}

.no-js .js-to_expand {
  animation: 300ms ease-in 300ms forwards no-js;
}

I made a small pen to play with it.

I know you're not delivering CSS along with your script but that may be another way of styling to mention :)

I'd love to have your opinion on this!

ffoodd avatar Mar 20 '17 08:03 ffoodd