hello,
this is my final code for image hover slider. it works fine.
the only problem is on hover it takes min 3 second to change the image, i want as soon as the hover of mouse it starts changing the image.
i made the space between property to 00 but still it takes 3 second i want to change the images quickly on mouse hover so user do not need to wait.
<link href="../frontbanner/frontslider.css" rel="stylesheet" />
<div class="col-md-4 col-xs-4">
<div class="swiper-container1 swiper-container1">
<div class="swiper-wrappertop">
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" OnItemCommand="ListView1_ItemCommand">
<ItemTemplate>
<div class="swiper-slidetop">
<asp:ImageButton ID="ImageButton1" CommandName="view" runat="server" ImageUrl='<%# Eval("Icon") %>' Width="100%" CssClass="border-shadow" />
</div>
<asp:Label ID="Label1" runat="server" Visible="false" Text='<%# Eval("CategoryName") %>'></asp:Label>
</ItemTemplate>
</asp:ListView>
</div>
<style>
.swiper-container1 {
width: 100%;
height: 100%;
}
.swiper-slidetop {
background-position: center;
background-size: cover;
}
</style>
<script src="../frontbanner/frontslider.js"></script>
<!-- Initialize Swiper -->
<script>
var swiper = new Swiper('.swiper-container1', {
spaceBetween: 00,
effect: 'fade',
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
$(".swiper-container1").mouseenter(function () {
swiper.autoplay.start();
});
$(".swiper-container1").mouseleave(function () {
swiper.autoplay.stop();
});
</script>
</div>