Different breakpoint for tablet

ti's Avatar

ti

15 Dec, 2017 01:48 PM

Hi!!

We have configurated the visiblenearby with center-ratio: 0.25.
We enabled the breakpoint for screens low than 450px with breakpoint-center-area-ration: 0.95.

Till this point it's all working good!!!

My issue is with the tablet screen (between 650px to 1200px screens), we need that could get a different center area (0.5).

Follow bellow my code:
...
jQuery(document).ready(function($) {
      var si = $('#gallery-gastronomia-paes').royalSlider({
        addActiveClass: false,
        arrowsNav: true,
        arrowsNavAutoHide: false,
        arrowsNavHideOnTouch: false,
        slidesSpacing: 2,
        imageScalePadding: 0,
        imageScaleMode:'none',
        imageAlignCenter: true,
        transitionSpeed: 400,
        loopRewind: true,
        numImagesToPreload: 4,
        usePreloader: true,
        sliderDrag: true,
        sliderTouch: true,
        navigateByClick: false,
        
        controlNavigation: 'bullets',
// autoScaleSlider: false,
// autoScaleSliderWidth: 960,
// autoScaleSliderHeight: 340,
        loop: false,
        fadeinLoadedSlide: false,
        globalCaption: false,
        keyboardNavEnabled: true,
        globalCaptionInside: false,

        visibleNearby: {
          enabled: true,
          centerArea: 0.25,
          center: false,
          breakpoint: 450,
          breakpointCenterArea: 0.95,
          navigateByCenterClick: false
        }
      }).data('royalSlider');

      // link to fifth slide from slider description.
      $('.slide4link').click(function(e) {
        si.goTo(4);
        return false;
      });
    });
...

I'm not a Js specialist lol, can you please tell me what I have to insert there?

  1. 1 Posted by ti on 15 Dec, 2017 02:19 PM

    ti's Avatar
  2. Support Staff 2 Posted by Dmitry Semenov on 15 Dec, 2017 07:19 PM

    Dmitry Semenov's Avatar

    Hello,

    You may use this technique to define breakpoint via CSS http://help.dimsemenov.com/discussions/problems/4068-visiblenearby-...

  3. ti closed this discussion on 21 Dec, 2017 06:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac