Skip to content
Snippets Groups Projects
Commit 0b1eea8f authored by Phil Hughes's avatar Phil Hughes
Browse files

Removed console.log

Uses outerWidth instead of width
parent 29130f37
No related branches found
No related tags found
1 merge request!4616Aligned the two navs horizontally
Pipeline #
Loading
@@ -18,13 +18,8 @@ $ ->
Loading
@@ -18,13 +18,8 @@ $ ->
   
$('.scrolling-tabs').on 'scroll', (event) -> $('.scrolling-tabs').on 'scroll', (event) ->
$this = $(this) $this = $(this)
$el = $(event.target)
currentPosition = $this.scrollLeft() currentPosition = $this.scrollLeft()
size = bp.getBreakpointSize() maxPosition = $this.prop('scrollWidth') - $this.outerWidth()
controlBtnWidth = $('.controls').width()
maxPosition = ($this.get(0).scrollWidth - $this.parent().width()) - 1
# maxPosition += controlBtnWidth if size isnt 'xs' and $('.nav-control').length
console.log maxPosition, currentPosition
   
$el.find('.fade-left').toggleClass('end-scroll', currentPosition is 0) $this.find('.fade-left').toggleClass('end-scroll', currentPosition is 0)
$el.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition) $this.find('.fade-right').toggleClass('end-scroll', currentPosition is maxPosition)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment