Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. tabbladen = ["invoeren", "statistieken","instellingen", "informatie"];
  2.  
  3.  
  4. $(".content").swipe( {
  5. swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
  6. activeTab = _findActiveTab().slice(0,-4);
  7. index = tabbladen.indexOf(activeTab);
  8. if(direction === 'right' && index > 0) {
  9. $('ul.tabs').tabs('select_tab', tabbladen[index - 1]);
  10. } else if (direction === 'left' && index < 3) {
  11. $('ul.tabs').tabs('select_tab', tabbladen[index + 1]);
  12. }
  13. },
  14. threshold:15,
  15. fingers:'all'
  16. });
  17.  
  18. var _findActiveTab = function() {
  19. $(".tabs").find('a').each(function () {
  20. if($(this).hasClass('active')) {
  21. activeTab = $(this).attr('id');
  22. };
  23. });
  24. return activeTab
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement