SlidesJS responsive full width, height resizing

2,856 views
Skip to first unread message

Matteo Pelosi

unread,
Jun 2, 2014, 3:36:13 AM6/2/14
to slid...@googlegroups.com
Hello everyone,
so i've se up a slidesJS slider in a responsive website. No problems when i have the container fixed width at 1260px (in slidesJS settings i put 1260,350). however when the container goes 100% (at 1260px markpoint with media query) the slider height resizes. I want it to keep the height at 350px but have no idea where to start. In other words i need .slidesjs-container, .slidesjs-control{height:350px;} that via CSS doesn't work Thanks in advance

Thin Soldier

unread,
Jun 3, 2014, 2:42:22 PM6/3/14
to slid...@googlegroups.com

The width and height given to the settings is used more like an aspect ratio. The width and height always expand in relation to each other. With much effort and javascript I have made it possible to stick to a fixed height defined in my stylesheets. I can share what I have but it is a lot of very messy javascript.

Thin Soldier

unread,
Jun 11, 2014, 12:06:44 AM6/11/14
to slid...@googlegroups.com
Took a while to simplify this down to a demo page. It's still quite messy :(


Whatever you set the height of the slideshow parent to (via css, including media queries) is what it will stay at after resizing the window.


On Monday, June 2, 2014 3:36:13 AM UTC-4, Matteo Pelosi wrote:

Saptarshi Gan

unread,
Jan 4, 2015, 7:07:28 PM1/4/15
to slid...@googlegroups.com
You can try changing the slidesjs file and keep the container height fixed in it.In the file change the part of the code where new height is measured to keep it to old height.
Like below:
n=this.options.height/this.options.width*r;  to n=this.options.height;  and it will work.
also attached the modified file for you
jquery.slides.min.js
Reply all
Reply to author
Forward
0 new messages