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

onOpen/Close: addClass/removeClass doesn't work. #315

Open
samremonte opened this issue Nov 4, 2016 · 0 comments
Open

onOpen/Close: addClass/removeClass doesn't work. #315

samremonte opened this issue Nov 4, 2016 · 0 comments

Comments

@samremonte
Copy link

samremonte commented Nov 4, 2016

I'm not sure why this isn't working. Need help from you guys. Thanks

(function($) {

	$(document).ready(function() {

		$('#burger-icon').sidr({
			name: 'sidr',
			side: 'right',
			speed: 500,
			source: '#sidr',
                        onOpen: function() {
                             $('#burger-icon').addClass('open');
			     $('.lock').addClass('on');
                        },
                        onClose: function() {
                             $('#burger-icon').removeClass('open');
			     $('.lock').removeClass('on');
                        }
		});

		$.sidr('open', 'sidr');
		setTimeout(function(){
			$.sidr('close', 'sidr');
		}, 1500);

	});

})( jQuery );
@samremonte samremonte changed the title onOpen: doesn't work. onOpen: addClass doesn't work. Nov 4, 2016
@samremonte samremonte changed the title onOpen: addClass doesn't work. onOpen/Close: addClass/removeClass doesn't work. Nov 4, 2016
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