JSFiddle - React, Tailwind, and code Playground
by treblesandblues
HTML
<script src="https://cdn.jsdelivr.net/jquery.swipebox/1.2.1/jquery.swipebox.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.swipebox/1.2.1/swipebox.css">
<h1>Seasons</h1>
<div class="box">
<a rel="gallery-1" href="https://s23.postimg.org/dqoald84b/spring.jpg" class="swipebox">
<img src="https://s23.postimg.org/dqoald84b/spring.jpg" alt="spring">
</a>
<a rel="gallery-1" href="https://s30.postimg.org/55hxiaudt/summer.jpg" class="swipebox">
<img src="https://s30.postimg.org/55hxiaudt/summer.jpg" alt="summer">
</a>
<a rel="gallery-1" href="https://s29.postimg.org/mlve5q06f/fall.jpg" class="swipebox">
<img src="https://s29.postimg.org/mlve5q06f/fall.jpg" alt="fall">
</a>
<a rel="gallery-1" href="https://s28.postimg.org/f4xe2mx25/winter.jpg" class="swipebox">
<img src="https://s28.postimg.org/f4xe2mx25/winter.jpg" alt="winter">
</a>
</div>
CSS
.box img {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 30px;
width: 50%;
height: auto;
}
img:hover {
opacity: 0.5;
transition: 0.3s;
color: #056cd4;
}
h1 {
text-align: center;
color: blue;
}
body {
font-family: Helvetica Neue, Arial;
}
JavaScript
$(document).ready(function() {
jQuery(function($) {
$(".swipebox").swipebox();
});
});