JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<div class="slider3 want_to_read_block book_block" >
<ul class='book_list bxslider_want slides'>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
</ul>
</div>
<div class="slider4 wish_block book_block" > <ul class='book_list bxslider_wish slides'>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
<li class='slide'>
<a href='' >
<img src='http://ecx.images-amazon.com/images/I/61y52QfImjL.jpg'/>
</a>
</li>
</ul>
</div>
CSS
ul.book_list{
padding:0px;
margin:0px;
list-style:none;
width:100%;
height:180px;
position:relative;
}
.wantread{
background:#A5A5A5;
padding: 10px;
border-radius: 20px;
border: 1px solid #d5eded;
text-align:center;
}
.reading,.wantread,.read{
position:relative;
margin-bottom: 20px;
height:200px;
}
.slide{
width:100px;
height:150px;
overflow:hidden;
margin:10px 5px;
position:relative;
z-index:1;
float:left
}
.slide img{
width:100%;
height:auto;
}
}
.books{
float: left;
height: 518px;
width:23%;
margin:1%;
padding:0;
position: relative;
overflow: hidden;
}
.book_img{
width: 100%;
min-height: 250px;
}
.button.small{
-o-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.book_title{
font-family: "CaviarDreamsBold", Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
color: #8c8c8c;
text-align: center;
padding: 0 5px;
margin-bottom: 100px;
overflow: hidden;
text-shadow: 2px 2px #C6E4E4;
-o-text-shadow: 2px 2px #C6E4E4;
-moz-text-shadow: 2px 2px #C6E4E4;
-webkit-text-shadow: 2px 2px #C6E4E4;
}
.book_authors{
text-align: right;
color: #47b5c6;
font-family: arial;
margin-right: 10px;
margin-bottom: 0px;
padding-bottom: 0px;
padding: 0 5px;
font-weight: bold;
font-size: 14px;
max-height: 34px;
overflow: hidden;
}
.book_hr{
background-color: #ccc;
border:0;
height: 1px;
}
.book_info{
text-align: right;
color: #c6c6c6;
font-family: arial;
margin-right: 10px;
padding: 0 5px;
font-size: 12px;
}
.bx-viewport {
overflow:visible !important;
z-index:0;
}
.bx-wrapper{
z-index:1
}
.book_block{
z-index:0
}
.droped{
top:0px !important;
left:0px !important;
}
.books-section h2{
padding-bottom:0px;
text-align:center;
border-radius: 20px 20px 0 0;
-webkit-border-radius: 20px 20px 0 0;
-moz-border-radius:...
JavaScript
a = 30000;
$(".slide").draggable({
// brings the item back to its place when dragging is over
revert:true,
// once the dragging starts, we decrease the opactiy of other items
// Appending a class as we do that with CSS
start: function(event, ui) { },
drag:function () {
$(this).removeClass('droped');
},
// removing the CSS classes once dragging is over.
stop:function () {
$(this).addClass('droped');
},
zIndex: 10000,
snapMode: "inner"
});
$(".wish_block").droppable({
drop:function (event, ui) {
var label;
var element = $('ul.bxslider_wish'),
move = ui.draggable;
var book_id = move.attr('data-book-id');
jQuery(move[0]).css({'left':'0px !important','top':'0px !important'});
jQuery(ui.helper).css({'left':'0px !important','top':'0px !important'});
element.append(move[0]);
}
});
// jQuery Ui Droppable
$(".want_to_read_block").droppable({
drop:function (event, ui) {
var label;
var element = $('ul.bxslider_want'),
move = ui.draggable;
jQuery(move[0]).css({'left':'0px !important','top':'0px !important'});
jQuery(ui.helper).css({'left':'0px !important','top':'0px !important'});
element.append(move[0]);
var book_id = move.attr('data-book-id');
}
});