Being responsive, Responsively
Love royalslider, but the responsive side of things is getting me down: The slider scales all the way, but the HTML Blocks inside the slides don't, so they get cropped by the overflow:hidden.
When using the slider, i have a 1140x 400 slider going on, but on mobile, it's just not nice, is there anyway to change the slider to crop the image & use the height of the HTMLblock inside it?
When using this:
jQuery(document).ready(function($) {
/* getting viewport width */
var responsive_viewport = $(window).width();
/* if is larger than 481px */
if (responsive_viewport < 481) {
// get slider instance
var slider = $('#new-royalslider-1').data('royalSlider');
slider.st.imageScaleMode = "fill";
slider.updateSliderSize(true);
}
});
I get this error showing in chrome: Cannot read property 'st' of undefined
& this error in firebug: [Break On This Error] slider.st.imageScaleMode = "fill";
Heck knows why though :(
.
help.dimsemenov.com
No comments:
Post a Comment