You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Default options{num: 1,// number of tabs in view at onceanimation: 'ease',// type of animation for tabs changinganimationTime: 300,// time in ms for animationscrollBreakpoint: 0.3,// breakpoint for scroll, when tab should be changedloop: false// loop on next/prev/active or not}
tabs.hasNext();// always returns true if loop = true
Check if there are tabs before active tab
tabs.hasPrev();// always returns true if loop = true
On scroll event
tabs.onScrollPercent=(percent)=>{// percent = scroll left position / width of 1 tab};
Event listeners
tabs.querySelector('div').onActive=()=>{// load posts or something when first div becomes active}tabs.querySelector('div').onInactive=()=>{// do something when first div becomes inactive}