Skip to content

webMasterMrBin/height-transitioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js implement folding and fading animation effects of DOM elements with dynamic height

WHY

https://css-tricks.com/using-css-transitions-auto-dimensions/

EXAMPLE

  <html>
    <style>
      #target {
        overflow: hidden;
        /* animate css support */
        transition: all linear .2s;
      }
    </style>
    <body>
      <div id="target">
        <!-- dynamic count element in this -->
      </div>
    </body>
  </html>
  import { getCollapseAndExpandContainerFn } from 'height-transitioner';
  const { collapseContainer, expandContainer } = getCollapseAndExpandContainerFn(document.getElementById('target))

  // now call collapse or expand funciton based on your needs

About

simple js implement dom element collapse/expand animate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors