Skip to content

Commit

Permalink
Merge pull request #37 from viivue/2.1.6
Browse files Browse the repository at this point in the history
2.1.6
  • Loading branch information
phucbm authored Feb 16, 2023
2 parents 022f382 + 5df2505 commit 91fa9f4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 16 deletions.
4 changes: 2 additions & 2 deletions dist/easy-tab-accordion.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/easy-tab-accordion.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@viivue/easy-tab-accordion",
"filename": "easy-tab-accordion",
"prettyName": "Easy Tabs & Accordion",
"version": "2.1.5",
"version": "2.1.6",
"description": "Javascript library to create tabs or accordion.",
"homepage": "https://github.com/viivue/easy-tab-accordion",
"repository": {
Expand Down
3 changes: 0 additions & 3 deletions src/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ export function setTransition(target, duration){
*/
export function removeTransition(target){
setCSS(target, {
overflow: '',
transitionProperty: '',
transitionDuration: '',
boxSizing: '',
paddingTop: '',
paddingBottom: '',
Expand Down
4 changes: 0 additions & 4 deletions src/fade.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import {getElementMarginHeight, removeTransition, setCSS, setTransition} from ".
* @since 1.0.0
*/
export function fadeOut(target, duration = 500, fn){
// before
setTransition(target, duration);

// animate
setCSS(target, {
opacity: '0',
Expand All @@ -38,7 +35,6 @@ export function fadeOut(target, duration = 500, fn){
*/
export function fadeIn(target, duration = 500, fn){
// before
setTransition(target, duration);
setTransition(target.parentElement, duration);

// animate
Expand Down
4 changes: 3 additions & 1 deletion src/methods.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {responsive} from "./responsive";
import {setCSS} from "./animation";
import {setCSS, setTransition} from "./animation";
import {getHash} from "./hash";

export function initSetup(context){
Expand Down Expand Up @@ -44,6 +44,8 @@ export function initSetup(context){
setCSS(el, styleObj);
}, 1);
}

setTransition(el, context.options.duration);
});

assignTriggerElements(context);
Expand Down
4 changes: 1 addition & 3 deletions src/slide.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {setCSS, setTransition, removeTransition, getElementHeight} from "./animation";
import {setCSS, removeTransition, getElementHeight} from "./animation";
import {removeActiveClass} from "./helpers";


Expand All @@ -23,7 +23,6 @@ export function slideUp(target, duration = 500, fn){
boxSizing: 'border-box',
height
});
setTransition(target, duration);

// animate (set 10ms delay for CSS transition take effect)
setTimeout(() => {
Expand Down Expand Up @@ -67,7 +66,6 @@ export function slideDown(target, duration = 500, fn){
height: '0px',
display: 'block'
});
setTransition(target, duration);
}

// animate (set 10ms delay for CSS transition take effect)
Expand Down

0 comments on commit 91fa9f4

Please sign in to comment.