|
1 | 1 | /**
|
2 |
| - * fullPage 2.2.8 |
| 2 | + * fullPage 2.2.9 |
3 | 3 | * https://github.com/alvarotrigo/fullPage.js
|
4 | 4 | * MIT licensed
|
5 | 5 | *
|
|
498 | 498 |
|
499 | 499 | // additional: if one of the normalScrollElements isn't within options.normalScrollElementTouchThreshold hops up the DOM chain
|
500 | 500 | if (!checkParentForNormalScrollElement(event.target)) {
|
501 |
| - |
502 |
| - var touchMoved = false; |
503 | 501 | var activeSection = $('.fp-section.active');
|
504 | 502 | var scrollable = isScrollable(activeSection);
|
505 | 503 |
|
|
917 | 915 | }
|
918 | 916 | });
|
919 | 917 |
|
920 |
| - //navigation action |
921 |
| - $(document).on('click', '#fp-nav a', function(e){ |
| 918 | + /** |
| 919 | + * Scrolls to the section when clicking the navigation bullet |
| 920 | + */ |
| 921 | + $(document).on('click touchstart', '#fp-nav a', function(e){ |
922 | 922 | e.preventDefault();
|
923 | 923 | var index = $(this).parent().index();
|
924 | 924 | scrollPage($('.fp-section').eq(index));
|
925 | 925 | });
|
926 | 926 |
|
| 927 | + /** |
| 928 | + * Scrolls the slider to the given slide destination for the given section |
| 929 | + */ |
| 930 | + $(document).on('click touchstart', '.fp-slidesNav a', function(e){ |
| 931 | + e.preventDefault(); |
| 932 | + var slides = $(this).closest('.fp-section').find('.fp-slides'); |
| 933 | + var destiny = slides.find('.fp-slide').eq($(this).closest('li').index()); |
| 934 | + |
| 935 | + landscapeScroll(slides, destiny); |
| 936 | + }); |
| 937 | + |
| 938 | + |
927 | 939 | //navigation tooltips
|
928 | 940 | $(document).on({
|
929 | 941 | mouseenter: function(){
|
|
951 | 963 | /**
|
952 | 964 | * Scrolling horizontally when clicking on the slider controls.
|
953 | 965 | */
|
954 |
| - $('.fp-section').on('click', '.fp-controlArrow', function() { |
| 966 | + $('.fp-section').on('click touchstart', '.fp-controlArrow', function() { |
955 | 967 | if ($(this).hasClass('fp-prev')) {
|
956 | 968 | $.fn.fullpage.moveSlideLeft();
|
957 | 969 | } else {
|
|
1404 | 1416 | }
|
1405 | 1417 | }
|
1406 | 1418 |
|
1407 |
| - /** |
1408 |
| - * Scrolls the slider to the given slide destination for the given section |
1409 |
| - */ |
1410 |
| - $(document).on('click', '.fp-slidesNav a', function(e){ |
1411 |
| - e.preventDefault(); |
1412 |
| - var slides = $(this).closest('.fp-section').find('.fp-slides'); |
1413 |
| - var destiny = slides.find('.fp-slide').eq($(this).closest('li').index()); |
1414 |
| - |
1415 |
| - landscapeScroll(slides, destiny); |
1416 |
| - }); |
1417 |
| - |
1418 |
| - |
1419 | 1419 | /**
|
1420 | 1420 | * Checks for translate3d support
|
1421 | 1421 | * @return boolean
|
|
0 commit comments