We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When adding the class for reveal you can replace the switch statement since you already have a map declared.
switch (settings.reveal) { case 'bottom': $(settings.panel).addClass(classes.bottom); break; case 'left': $(settings.panel).addClass(classes.left); break; case 'right': $(settings.panel).addClass(classes.right); break; case 'fade': $(settings.panel).addClass(classes.fade); break; default: $(settings.panel).addClass(classes.top); break; }
can easily be re-written as
$(settings.panel).addClass(classes[settings.reveal] || classes.top)
Reduces the lines of code and get rid of the often problematic break; requirement between cases.
break;
https://github.com/bebaps/clear-menu/blob/master/src/clearmenu.js#L32
The text was updated successfully, but these errors were encountered:
That's a good point, and I never thought of it that way. Will implement.
Sorry, something went wrong.
No branches or pull requests
When adding the class for reveal you can replace the switch statement since you already have a map declared.
can easily be re-written as
Reduces the lines of code and get rid of the often problematic
break;
requirement between cases.https://github.com/bebaps/clear-menu/blob/master/src/clearmenu.js#L32
The text was updated successfully, but these errors were encountered: