Skip to content

Setting the Homepage Slider

You can change the image for the slider in homepage 1 in the html file. Here is the code to change the image

<img src="img/background/6.jpg" alt="" class="slide_bg">

For changing the parallax effect on slide, you can change the data-swiper-parallax-x value inside this code

<div class="slide_inner" data-swiper-parallax-x="90%">

But please note, don’t change the value too much to prevent any error.

Changing the slider settings


You can change more setting of the slider in the script.js file. Here is the code for it:

/* parallax slider script on Home 1*/
const para_slider = new Swiper('.para_slider', {
    speed: 800,
    loop: true,
    parallax: true,
    simulateTouch: false,
    preventInteractionOnTransition: true,
    autoplay: {
        delay: 5000,
        disableOnInteraction: false
    },

    // If we need pagination
    navigation: {
        nextEl: '.para_slider .next_swiper',
        prevEl: '.para_slider .prev_swiper',
    },

});
Back to top