All Projects → BrentonCozby → Dom Slider

BrentonCozby / Dom Slider

Licence: mit
Plain JavaScript version of jQuery's slideToggle(), slideDown(), & slideUp(), but does not use display: none.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dom Slider

Houdini
A simple, accessible show-and-hide/accordion script.
Stars: ✭ 148 (+236.36%)
Mutual labels:  accessibility, vanilla-js
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (+93.18%)
Mutual labels:  accessibility, vanilla-js
Basictable
Basic Table jQuery or Vanilla JS plugin for simple responsive tables.
Stars: ✭ 94 (+113.64%)
Mutual labels:  jquery, vanilla-js
Push State
Turn static web sites into dynamic web apps.
Stars: ✭ 16 (-63.64%)
Mutual labels:  jquery, vanilla-js
Boston.gov D7
Once housed code for boston.gov. Have moved to Drupal 8 as of November 2019.
Stars: ✭ 290 (+559.09%)
Mutual labels:  accessibility, jquery
Modal Video
Stars: ✭ 224 (+409.09%)
Mutual labels:  accessibility, jquery
On Screen Keyboard
A jQuery plug-in which provides users with a fluid-width on-screen keyboard.
Stars: ✭ 63 (+43.18%)
Mutual labels:  accessibility, jquery
Js Offcanvas
A lightweight, flexible jQuery off-canvas navigation plugin which lets you create fully accessible sidebar or top/bottom sliding (or push) panels with keyboard interactions and ARIA attributes.
Stars: ✭ 272 (+518.18%)
Mutual labels:  accessibility, jquery
Frontend Cheat Sheets
Collection of cheat sheets(HTML, CSS, JS, Git, Gulp, etc.,) for your frontend development needs & reference
Stars: ✭ 604 (+1272.73%)
Mutual labels:  accessibility, jquery
A11y tooltips
Accessible Tooltip Component
Stars: ✭ 35 (-20.45%)
Mutual labels:  accessibility, jquery
Jquery Alertable
Minimal alert and confirmation alternatives.
Stars: ✭ 38 (-13.64%)
Mutual labels:  jquery
Contrast Finder
Contrast-Finder finds correct color contrasts (background / foreground) for web accessibility (a11y, WCAG, RGAA). https://app.contrast-finder.org
Stars: ✭ 38 (-13.64%)
Mutual labels:  accessibility
Navscroll Js
Lightweight package for highlighting menu items as you scroll the page, also scrolling to target section when item clicked. Use as a vue component/directive or in vanilla js.
Stars: ✭ 41 (-6.82%)
Mutual labels:  vanilla-js
Jqueryexplain
jQuery源码解析
Stars: ✭ 43 (-2.27%)
Mutual labels:  jquery
Azure Armviewer
Graphically visualize Azure Resource Manager templates NO LONGER UPDATED
Stars: ✭ 38 (-13.64%)
Mutual labels:  jquery
Accessibility Checklist
Stars: ✭ 41 (-6.82%)
Mutual labels:  accessibility
Bootstrap Show Modal
A Bootstrap 4 / jQuery plugin wrapper, to create modals dynamically in JavaScript
Stars: ✭ 38 (-13.64%)
Mutual labels:  jquery
Storybook Addon A11y
REPO/PACKAGE MOVED - Storybook addon to help, improving accessibility within you're react components.
Stars: ✭ 37 (-15.91%)
Mutual labels:  accessibility
Emotion Ratings
😠 😞 😑 😊 😍 This plugin allows you to create ratings using emojis
Stars: ✭ 37 (-15.91%)
Mutual labels:  jquery
Jquery.touchslider
A jQuery plugin that makes it easy to create touch sliders.
Stars: ✭ 43 (-2.27%)
Mutual labels:  jquery

dom-slider

Known Vulnerabilities

It works like jQuery's slideToggle(), slideDown(), & slideUp(), but does not use display: none. Uses CSS3 transitions and element.scrollHeight to animate the height of elements with an unknown height.

dom-fader is a thing too.

Features:

  • Slides elements with a known or unknown height
  • Slides the height, padding, border, and margin (just the top and bottom values).
  • May slide multiple elements at once
  • Returns a Promise resolved with the element
  • Hides elements in a screen-reader-friendly way
  • Zero Dependencies and written in plain JavaScript (compiled to ES5)

Example Usage:

dom-slider CDN link

First, place the dom-slider CDN link in your html file above your own JavaScript files. Hide all the elements that you want to slide down/toggle using display: none in CSS. Then do stuff like below:

const {slideDown, slideUp, slideToggle} = window.domSlider

const box = document.querySelector('.box')

slideToggle({element: box})

slideUp({element: box, slideSpeed: 1200})

slideDown({element: box, slideSpeed: 800, easing: 'easeInOut'})

// Promises (or async/await)
slideDown({element: box, slideSpeed: 500}).then(() => {
  slideUp({element: box, slideSpeed: 300})
})

Options:

The element argument is required, but you may provide the following optional arguments to slideToggle, slideDown, and slideUp:

slideDown({
  element,
  slideSpeed, // speed in milliseconds
  easing, // CSS transition timing function,
  delay, // delay in milliseconds,
  visibleDisplayValue, // the CSS display value when the element is visible; the default value is "block"
})

Print Styling:

dom-slider removes the DOM-slider-hidden CSS class from all elements before printing and adds them back after printing.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].