Logo v4.3.1
Image Description

No Results

  • Get Support
  • Preview Demo
Logo v4.3.1
  • Docs
  • Snippets
  • Documentation
  • Introduction
  • Getting started
  • Getting Started
  • Gulp
  • Customization
  • Credits
  • Changelog
  • Design & Graphics
  • Bootstrap Icons
  • Duotone Icons
  • Illustrations
  • Components
  • Accordion
  • Alerts
  • Avatars
  • Badge
  • Breadcrumb
  • Buttons
  • Cards
  • Collapse
  • Column Divider
  • Devices
  • Divider
  • Dropdowns
  • Icons
  • List Group
  • Lists
  • Legend Indicator
  • Modal
  • Offcanvas
  • Page Header
  • Pagination
  • Popovers
  • Progress
  • Profile
  • Shapes
  • Spinners
  • Steps
  • Tab
  • Tables
  • Text Highlight
  • Toasts
  • Tooltips
  • Typography
  • Navbars
  • Navbar
  • Navs
  • Mega Menu
  • Scrollspy
  • Basic forms
  • Basic Forms
  • Checks & Switches
  • Input Group
  • Advanced Forms
  • Advanced Select
  • File Attachments
  • Drag’ n’ Drop File Uploads
  • WYSIWYG Editor
  • Quantity Counter
  • Input Mask
  • Step Forms (Wizards)
  • Range Slider (noUiSlider)
  • Add Field
  • Toggle Password
  • Count Characters
  • Toggle Switch
  • Toggle State
  • Switch
  • Media
  • Fullscreen Lightbox
  • Video Background
  • Video Player
  • Swiper
  • Others
  • Maps (Leaflet)
  • Chart.js
  • Circles.js (Pie Chart)
  • Sticky Block
  • Countdown
  • Sorting (Shuffle.js)
  • Go To
  • Show Animation
  • Typed.js
  • Utilities
  • Backgrounds
  • Borders
  • Colors
  • Links
  • Position
  • Rotations
  • Shadows
  • Sizing
  • Spacing
  • Z-index

Show Animation

A plugin to make boring show/hide blocks elegant with the opening/closing animation effects.

How to use

Copy-paste the following <script> near the end of your pages under JS Implementing Plugins to enable it.

        
          <script src="../assets/vendor/hs-show-animation/dist/hs-show-animation.min.js"></script>
        
      

Copy-paste the init function under JS Plugins Init., before the closing </body> tag, to enable it.

        
          <script>
            (function() {
              // INITIALIZATION OF SHOW ANIMATIONS
              // =======================================================
              new HSShowAnimation('.js-animation-link')
            })()
          </script>
        
      

Example

Scroll the area below the navbar or click on the menu to watch the smooth scrolling in action. It can also be used in the dropdowns.

  • Preview
  • HTML
First content Second content Third content

First content

This is where we sit down, grab a cup of coffee and dial in the details. Understanding the task at hand and ironing out the wrinkles is a key point.

Second content

Now that we've aligned the details, it's time to get things mapped out and organized. This part is really crucial in keeping the project in line to completion.

Third content

The time has come to bring those ideas and plans to life. This is where we really begin to visualize your napkin sketches and make them into beautiful pixels.

              
                <!-- Button Group -->
                <div class="btn-group btn-group-toggle">
                  <a class="js-animation-link btn btn-outline-secondary active" href="javascript:;"
                     data-hs-show-animation-options='{
                       "targetSelector": "#firstContent",
                       "groupName": "groups",
                       "animationType": "css-animation",
                       "animationIn": "slideInUp",
                       "duration": 400
                     }'>
                   First content</a>
                  <a class="js-animation-link btn btn-outline-secondary" href="javascript:;"
                     data-hs-show-animation-options='{
                       "targetSelector": "#secondContent",
                       "groupName": "groups",
                       "animationType": "css-animation",
                       "animationIn": "slideInUp",
                       "duration": 400
                     }'>
                    Second content</a>
                  <a class="js-animation-link btn btn-outline-secondary" href="javascript:;"
                     data-hs-show-animation-options='{
                       "targetSelector": "#thirdContent",
                       "groupName": "groups",
                       "animationType": "css-animation",
                       "animationIn": "slideInUp",
                       "duration": 400
                     }'>
                    Third content</a>
                </div>
                <!-- End Button Group -->

                <!-- Content -->
                <div id="firstContent" class="py-5">
                  <h2>First content</h2>
                  <p>This is where we sit down, grab a cup of coffee and dial in the details. Understanding the task at hand and ironing out the wrinkles is a key point.</p>
                </div>
                <!-- End Content -->

                <!-- Content -->
                <div id="secondContent" class="py-5" style="display: none; opacity: 0;">
                  <h2>Second content</h2>
                  <p>Now that we've aligned the details, it's time to get things mapped out and organized. This part is really crucial in keeping the project in line to completion.</p>
                </div>
                <!-- End Content -->

                <!-- Content -->
                <div id="thirdContent" class="py-5" style="display: none; opacity: 0;">
                  <h2>Third content</h2>
                  <p>The time has come to bring those ideas and plans to life. This is where we really begin to visualize your napkin sketches and make them into beautiful pixels.</p>
                </div>
                <!-- End Content -->
              
            

Methods

Parameters Description Default value

groupName

Setermines which selectors belong to the same group. This definition is necessary, since selectors can be in different parent blocks, without which it would be impossible to remove/add the necessary classes to selectors based on only the parent null

targetSelector

Defines the ID of the block to be displayed null

ignoreActiveClass

Ignore active class additions for trigger. false

classMap.active

Asset class for invokers classMap: { active: 'active' }

animationType

Animation appearing type:
  • simple - hide/show
  • css-animation
'simple'

animationInit

Class initializing css animation 'animated'

animationIn

Revealing animation effect null

duration

Animation duration null

afterShow

Executes code inside the function body each time a block appears -