
Originally Posted by
DivaVocals
would like to have the featured products scroller advance to the next 4 products versus the next single product as it currently does..
I know if I change this section in the includes/templates/winchester_responsive/templates/tpl_index_default.php and includes/templates/winchester_responsive/templates/tpl_index_categories.php files from:
Code:
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 1,
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
to:
Code:
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 4,
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
This works perfectly UNTIL.. you view it on a mobile device.. So how can I set it to scroll 4 on devices up to 979px and just scroll 1 at a time on smaller devices..
Try:
Code:
<?php
if($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile'){
?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 1,
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php
} else {
?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 4,
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php
}
?>