Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animation queue not working #84

Open
anybany opened this issue Oct 9, 2020 · 0 comments
Open

animation queue not working #84

anybany opened this issue Oct 9, 2020 · 0 comments

Comments

@anybany
Copy link

anybany commented Oct 9, 2020

Hi i am trying to achieve an animnation queue but it always only plays the second animation "VorhangAuf".
Can anyone please tell me what i am doing wrong?

here is my code:

jQuery(document).ready(function($) {

	var headerHeight = $('#vorhangHeader .elementor-row').height();
	var supportedFlag = $.keyframe.isSupported();

	$.keyframe.define([{
		name: 'VorhangZu',
		'0%': {
			'min-height': headerHeight
		},
		'100%': {
			'min-height': '100vh'
		}
	}, {
		name: 'VorhangAuf',
		'0%': {
			'min-height': '100vh'
		},
		'100%': {
			'min-height': headerHeight
		}
	}]);
      
	const vorhang = new Keyframes(document.getElementById('vorhangHeader').getElementsByClassName('elementor-container')[0]);
      
	vorhang.queue('VorhangZu 300ms cubic-bezier(.83,.03,.24,.65) 0s forwards', {
		onBeforeStart: () => {
			console.log('onBeforeStart 1');
		},
		onStart: () => {
                          console.log('onStart 1');
		},
		onEnd: () => {
			console.log('onEnd 1');
		}
	})
	.queue('VorhangAuf 2s cubic-bezier(.33,.01,0,.99) 2s forwards', {
		onBeforeStart: () => {
			console.log('onBeforeStart 2');
		},
		onStart: () => {
                         console.log('onStart 2');
		},
		onEnd: () => {
			console.log('onEnd 2');
		}
	});

});

in console i get this error and the following logs:

keyframes.js:143 Uncaught ReferenceError: exports is not defined
onBeforeStart 1
onBeforeStart 2
onStart 1
onStart 2
onEnd 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant