Fotorama - Multiple screens condition

0 votes
280 views
added Dec 20, 2018 in Plugins by LC Marshal Captain (25,790 points)
function getfotorama(fotorama){
  winWidth = $(window).width();
  options = {};
  if(!fotorama){
    console.log("no fotorama");
  }
  if(winWidth <= 379){
    options = {
      nav: false,
      maxheight: '100%',
      ratio: 4 / 3,
      fit: 'cover',
      arrows: 'always',
      loop: 'true',
      click: false,
    };
   $(".wrapper").append(caption_panel);
  }
  else{
    options = {
      width: '100%',
      maxheight: '68%',
      ratio: 4 / 3,
      nav: 'thumbs',
      fit: 'cover',
      arrows: 'always',
      thumbheight: 80,
      thumbwidth:80,
      thumbborderwidth: 0,
      loop: 'true',
      thumbmargin: 20,
      click: false,
    };
    $(".fotorama__stage").append(caption_panel);
  }
  fotorama.setOptions(options);
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...