jQuery BeforeAfter Slider

Example 2

Before After
Codes:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="./../dist/beforeafter.jquery.min.js"></script>

<div class="beforeAfter">
    <img src="./city-578174_1280.jpg" alt="Before">
    <img src="./city-573775_1280.jpg" alt="After">
</div>

<script>
    $('.beforeAfter').beforeAfter({
        movable: true,
        clickMove: true,
        position: 60,
        separatorColor: 'red',
        bulletColor: 'red',
        onMoveStart: function(e) {
            console.log(event.target);
        },
        onMoving: function() {
            console.log(event.target);
        },
        onMoveEnd: function() {
            console.log(event.target);
        },
    });
</script>

            

Author: MAMEDUL ISLAM
Credits: jQuery BeforeAfter Slider plugin by MAMEDUL