« See all FAQs for Diamond — Responsive WooCommerce Theme

How can I raise the homepage slider height ?



Well, you have to open theme file wp-content/themes/diamond/js/main.js and go to line 298. There you have to find the slider option.

autoPlay : false,
and change it to true:
autoPlay : true,
to enable autoplay.


Next thing to do is to raise slider height: Slightly lower you will find the code, which is responsive for the slider height (line 315):
$('#slider_body .anythingSlider').css({
'max-height': gridWidth/2.66 + 'px',
'height': gridWidth/2.66 + 'px'
});

Slider height is dependent on the width with the following expression: gridWidth / 2.66 To raise the height of the slider you should decrease the number 2.66. Let’s use 1.78 for our example. Ultimately, the final portition of the code should look like the following:
//Slider Home
$(window).resize(function(){
var gridWidth = $(".container_12 .grid_12").outerWidth();
$('#slider').anythingSlider({
enableArrows : true,
buildStartStop : false,
autoPlay : true,
delay : 4000,
pauseOnHover : false,
startPanel : 1,
onInitialized: function(e, slider) {
$(slider.el).swipe({
swipeLeft: function() { slider.goForward() },
swipeRight: function() { slider.goBack() }
});
}
})
.anythingSliderFx({
'.slid_content h2' : [ 'caption-Left', '100' ],
'.slid_content p.slid-desc' : [ 'caption-Left', '610px', '600' ],
'.slid_content .buy_now' : [ 'caption-Left', '1220px', '1000' ]
});

$('#slider_body .anythingSlider').css({
'max-height': gridWidth/1.78 + 'px',
'height': gridWidth/1.78 + 'px'
});
});
by
by
by
by
by
by