diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-12 16:23:31 +0300 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-26 01:14:28 +0300 |
commit | 84fee47a763b6f1dda8b58e66c893cd8cf6dda8e (patch) | |
tree | 0095cf383a8013348b4cfee30016e1c555899ca6 /app/assets/javascripts/layout_nav.js.coffee | |
parent | 09ad0020587b01b614d0a686f9b1a45d492dfbff (diff) |
Start scrolling tabs design
Diffstat (limited to 'app/assets/javascripts/layout_nav.js.coffee')
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee new file mode 100644 index 00000000000..2f2f5aa85c5 --- /dev/null +++ b/app/assets/javascripts/layout_nav.js.coffee @@ -0,0 +1,19 @@ +class @LayoutNav + $(document).ready -> + $('#scrolling-tabs').on 'scroll', -> + cur = $(this).scrollLeft() + if cur == 0 + return + else + max = 289 + console.log "MAX:" + max + console.log "CUR:" + cur + if cur == max + $('.fa-arrow-right').addClass('end-scroll') + $('.nav-links').addClass('end-scroll') + else + $('.fa-arrow-right').removeClass('end-scroll') + $('.nav-links').removeClass('end-scroll') + return + $('#scrolling-tabs').trigger 'scroll' + return |