I'm making a slideshow that works with a responsive layout. After hours of work the slideshow is now responsive to the layout, but because of the width being 100% options fn:'scrollHorz' isn't working correctly. Because the width: 100% is being given to the left: style on the class. So my question is how can I get this to work. I would really appreciate any help.
This is my markup
<div id="test">
<section>
<img src="images/sliderContent_1.png" alt="Slide 1" />
</section>
<section>
<img src="images/sliderContent_1.png" alt="Slide 2" />
</section>
<section>
<img src="images/sliderContent_1.png" alt="Slide 2" />
</section>
</div>
this my css
section {
margin: 0;
}
img {
max-width: 100%;
}
img.loading {
margin-bottom: 2em;
visibility: hidden;
}
#page-wrapper-test {
width: 100%;
margin: 0 auto;
}
#test {
width: 100%;
}
div.loading {
width: 100%;
}
#test section { width: 100%; }
and this is my script
$(document).ready(function() {
$('#test').prepend('<img class="loading" src="images/loading.gif" />');
$('#test').after('<div id="nav" class="nav">');
$('#test').cycle({
slideExpr: 'section',
fx: 'scrollHorz',
timeout: 0,
pager: '#nav',
next: '#test',
slideResize: true,
containerResize: false,
width: '100%',
fit: 1,
});
});