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

Rewrite styleguide-search to vanilla JS #405

Closed
Wolfr opened this issue Jul 19, 2021 · 2 comments
Closed

Rewrite styleguide-search to vanilla JS #405

Wolfr opened this issue Jul 19, 2021 · 2 comments

Comments

@Wolfr
Copy link
Contributor

Wolfr commented Jul 19, 2021

Rewrite styleguide-search (https://github.com/usebedrock/bedrock/blob/develop/core/js/styleguide-search.js) to vanilla JS.

Should be fairly simple, 27 lines of code. Some notes:

  • $(this).parent() --> parentNode
  • $('#styleguideSearch') --> document.getElementById(styleguideSearch);
  • Show and hide can be done by setting style.display
@Wolfr
Copy link
Contributor Author

Wolfr commented Nov 16, 2021

This was implemented in d9ff27c

@Wolfr Wolfr closed this as completed Nov 16, 2021
@Wolfr Wolfr reopened this Nov 16, 2021
@Wolfr
Copy link
Contributor Author

Wolfr commented Nov 16, 2021

The code that was PR'd has its problems, one of which is still using parts of jQuery.

I implemented a standalone filter as a codepen, we can use this type of code to implement it in Bedrock.

https://codepen.io/wolfr/pen/GRvPRry

@Wolfr Wolfr closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant