Created
November 24, 2016 16:31
-
-
Save antonhedstrom/b22cd892e09bd5bea2eeaa5ad858b762 to your computer and use it in GitHub Desktop.
Awesome snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onClickMagnifyIcon: function() { | |
| var dsw = document.getElementByClassName("dynamic-search-wrapper"); | |
| if (!!dsw[0].className.match(new RegExp('(\\s|^)'+'search-open'+'(\\s|$)'))) { | |
| dsw[0].className = 'dynamic-search-wrapper'; | |
| } else { | |
| dsw[0].className += ' search-open'; | |
| } | |
| var self = this; | |
| this.$el.toggleClass('search-open'); | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment