diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2018-02-02 16:52:09 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 16:52:09 +0530 |
commit | 604edb85b423b76ef444246ec3aa00ff958a1b51 (patch) | |
tree | 3158ef67f8ff27cdd5b4ce3a76fc433733b0106c /js/menu-temp.js | |
parent | 17a0bb364814f7aef01dfae1578aa8ab5a0f37c4 (diff) |
Add files via upload
Diffstat (limited to 'js/menu-temp.js')
-rw-r--r-- | js/menu-temp.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/menu-temp.js b/js/menu-temp.js new file mode 100644 index 0000000..12ec864 --- /dev/null +++ b/js/menu-temp.js @@ -0,0 +1,28 @@ +$('.menu-btn').on('click', function() { + + var elem = $(this), + item = $('.menu__item'), + active = 'is-active', + play = 'menu__item--play'; + + if ( elem.hasClass(active) ) { + elem.removeClass(active); + $(item.get().reverse()).each(function(i) { + var row = $(this); + setTimeout(function() { + row.removeClass(play); + }, 50*i); + }); + } + + else { + elem.addClass(active); + item.each(function(i) { + var row = $(this); + setTimeout(function() { + row.addClass(play); + }, 50*i); + }); + } + + });
\ No newline at end of file |