4

I attach the link of my code here. in this, the slider animates correctly when clicking on the corner but I need is that working on the scroll.

$(document).ready(function () {
$('.corner').click(function() {
    var $parent = $(this).parent();
    $parent.removeClass("active");
    if ($parent.next().length){
        $parent.next().addClass("active");
    } else {
        $parent.prevAll().last().addClass("active");
    }
});
});

https://jsfiddle.net/freer4/cqqxjjgu/1/

user94
  • 409
  • 1
  • 6
  • 20

1 Answers1

3

Try out this:

$('.corner').bind('mousewheel',function() {
    alert(1);
        var $parent = $(this).parent();
        $parent.removeClass("active");
        if ($parent.next().length){
            $parent.next().addClass("active");
        } else {
            $parent.prevAll().last().addClass("active");
        }
    });
raikumardipak
  • 1,461
  • 2
  • 29
  • 49