A Pen by Ruben Cabrera on CodePen.
Created
October 26, 2019 19:16
-
-
Save beseidel/c8fcd13496958ff9bd92254d6b516738 to your computer and use it in GitHub Desktop.
Slider Before-After
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="ba-slider"> | |
<img src="http://ddragon.leagueoflegends.com/cdn/img/champion/splash/TwistedFate_4.jpg" alt="" /> | |
<div class="resize"> | |
<img src="http://ddragon.leagueoflegends.com/cdn/img/champion/splash/TwistedFate_3.jpg" alt="" /> | |
</div> | |
<span class="handle"></span> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$('.ba-slider').beforeAfter(); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<script src="https://cdn.rawgit.com/jotform/before-after.js/master/before-after.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ba-slider { | |
width: 1100px; | |
margin: auto; | |
border: 5px solid #000; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdn.rawgit.com/jotform/before-after.js/master/before-after.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment