nicinabox / superslides

A fullscreen, hardware accelerated slider for jQuery.
http://archive.nicinabox.com/superslides
MIT License
1.51k stars 443 forks source link

Using 'preserve' on mobile devices #306

Open marcelo2605 opened 9 years ago

marcelo2605 commented 9 years ago

I would like to change the slide behavior on mobile devices. So I added the class 'preserve' in this way:

var windowWidth = $( window ).width();
if(windowWidth <= 767){
      $("#slides img").addClass("preserve");
}

$slides.superslides({
    'play' : 7000,
});

Worked fine. But now the '#slide' element keep getting the total window height, instead the slides height. Is there a solution for this?

Thanks!