Code Duplication    Length = 10-10 lines in 2 locations

js/jquery.flexslider.js 2 locations

@@ 550-559 (lines=10) @@
547
                if(!slider){
548
                    return;
549
                }
550
                if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
551
                    var updateDx = (reverse) ? -dx : dx,
552
                        target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
553
554
                    if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
555
                        slider.flexAnimate(target, slider.vars.pauseOnAction);
556
                    } else {
557
                        if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
558
                    }
559
                }
560
561
                startX = null;
562
                startY = null;
@@ 463-472 (lines=10) @@
460
              // finish the touch by undoing the touch session
461
              el.removeEventListener('touchmove', onTouchMove, false);
462
463
              if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
464
                var updateDx = (reverse) ? -dx : dx,
465
                    target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
466
467
                if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
468
                  slider.flexAnimate(target, slider.vars.pauseOnAction);
469
                } else {
470
                  if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
471
                }
472
              }
473
              el.removeEventListener('touchend', onTouchEnd, false);
474
475
              startX = null;