Dymanically change controlNavigation

fuel's Avatar

fuel

21 Oct, 2012 11:30 AM

Dmitry, I'm trying to change the controlNavigation when entering fullscreen modus. When not in fullscreen I dont want the thumbnails to be visibble, only wheen fullscrene is active. I tried the following but with no succes:

var royal = $('#full-slider').royalSlider({

    config things ....
}).data('royalSlider');

function enterFullscreen() {
    royal.enterFullscreen()
}
function exitFullscreen() {
    royal.exitFullscreen()
}

royal.enterFullscreen = function() {
    royal.st.controlNavigation = "thumbnails";
    $.rsProto.enterFullscreen.call(this);
};

royal.exitFullscreen = function() {
    royal.st.controlNavigation = "bullets";
    $.rsProto.exitFullscreen.call(this);
};

$('#fullscreen').click(function(e){
    royal.enterFullscreen();
    e.preventDefault();
});

I also tried to set display:none on the thumbs when in normal mode but I quess the calculation of the sliderheigth includes the height of the thumbnail space as I'm still seeing the space where the thumbnails should be.
Hope you can give a point in the rigth direction.

Cheers
Jerome

  1. Support Staff 1 Posted by Dmitry Semenov on 21 Oct, 2012 05:45 PM

    Dmitry Semenov's Avatar

    This might be complex. Better simply hide them via CSS display:none.

    Dmitry

  2. 2 Posted by fuel on 21 Oct, 2012 05:58 PM

    fuel's Avatar

    Hey Dmitry. As told i already tried to use display none. This didnt seemt to work because the height of the slider is calculated as if the thumbnails where there, so it leaves me with a big white space at the bottom. Maybe I/m missing something but hope you can help me out.

  3. Support Staff 3 Posted by Dmitry Semenov on 22 Oct, 2012 06:33 AM

    Dmitry Semenov's Avatar

    There is fitInViewport option that will disable this http://dimsemenov.com/plugins/royal-slider/documentation/#thumbnails

    Dmitry

  4. fuel closed this discussion on 16 Jul, 2013 02:28 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