Skip to content

Commit dba859a

Browse files
committed
- Double click over bullets on touch devices no longer needed alvarotrigo#712
1 parent ee02783 commit dba859a

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

jquery.fullPage.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* fullPage 2.2.8
2+
* fullPage 2.2.9
33
* https://github.com/alvarotrigo/fullPage.js
44
* MIT licensed
55
*
@@ -498,8 +498,6 @@
498498

499499
// additional: if one of the normalScrollElements isn't within options.normalScrollElementTouchThreshold hops up the DOM chain
500500
if (!checkParentForNormalScrollElement(event.target)) {
501-
502-
var touchMoved = false;
503501
var activeSection = $('.fp-section.active');
504502
var scrollable = isScrollable(activeSection);
505503

@@ -917,13 +915,27 @@
917915
}
918916
});
919917

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){
922922
e.preventDefault();
923923
var index = $(this).parent().index();
924924
scrollPage($('.fp-section').eq(index));
925925
});
926926

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+
927939
//navigation tooltips
928940
$(document).on({
929941
mouseenter: function(){
@@ -951,7 +963,7 @@
951963
/**
952964
* Scrolling horizontally when clicking on the slider controls.
953965
*/
954-
$('.fp-section').on('click', '.fp-controlArrow', function() {
966+
$('.fp-section').on('click touchstart', '.fp-controlArrow', function() {
955967
if ($(this).hasClass('fp-prev')) {
956968
$.fn.fullpage.moveSlideLeft();
957969
} else {
@@ -1404,18 +1416,6 @@
14041416
}
14051417
}
14061418

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-
14191419
/**
14201420
* Checks for translate3d support
14211421
* @return boolean

jquery.fullPage.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)