JSFiddle - React, Tailwind, and code Playground

by Daffa Aditya

HTML

<script src="http://dfc-code.hol.es/js/col.js"></script>
<div id='slidewrap'>
<ul class='kwicks horizontal'>
   
   <!-- slide 1 code start -->
   <li id='kwick_1'>
      <span class='fadeout'/>
      <div class='excerpt'>
         <h2><a href='http://dfc48.blogspot.com/2014/01/download-mod-jutsu-di-naruto-untuk-gta.html' title='MOD Jutsu Naruto GTA SA'>MOD Jutsu Naruto GTA SA</a></h2>
         <a class='more4' href='http://dfc48.blogspot.com/2014/01/download-mod-jutsu-di-naruto-untuk-gta.html' title='Read More'>Read More</a>
      </div>
      <img alt='Popular Post' height='280' src='http://www.hdwallpapers.in/walls/niko_grand_theft_auto_iv-wide.jpg' width='600'/>
   </li>
   <!-- slide 1 code end -->
   
   <!-- slide 2 code start -->
   <li id='kwick_2'>
      <span class='fadeout'/>
      <div class='excerpt'>
         <h2><a href='http://dfc48.blogspot.com/2014/01/psikotes-cara-mengecek-anda-feminim.html' title='Cek anda feminim atau maskulin'>Anda Feminim atau Maskulin?</a></h2>
         <a class='more4' href='http://dfc48.blogspot.com/2014/01/psikotes-cara-mengecek-anda-feminim.html' title='Read More'>Read More</a>
      </div>
      <img alt='Popular Post' height='280' src='http://1.bp.blogspot.com/-PWt9ZZjxVuE/Ut0hzc4--nI/AAAAAAAABMQ/PI0M2_jKj30/s1600/51.jpg' width='600'/>
   </li>
   <!-- slide 2 code end -->
   
   <!-- slide 3 code start -->
   <li id='kwick_3'>
      <span class='fadeout'/>
      <div class='excerpt'>
         <h2><a href='http://dfc48.blogspot.com/2014/01/download-pajama-drive-senshuraku-jkt48_20.html' title='Download Pajadora JKT48 Gen 2'>Pajadora JKT48 Gen 2</a></h2>
         <a class='more4' href='http://dfc48.blogspot.com/2014/01/download-pajama-drive-senshuraku-jkt48_20.html' title='Read More'>Read More</a>
      </div>
      <img alt='Popular Post' height='280' src='http://jkt48project.files.wordpress.com/2014/02/banner_006.jpg' width='600'/>
   </li>
   <!-- slide 3 code end -->
   
   <!-- slide 4 code start -->
   <li...

CSS

#slidewrap {
margin: 10px 0 25px 0px;
padding: 0px;
position: relative;
width: 98%;
height: 280px;
overflow: hidden;
float:left;
}
.kwicks {
/* recommended styles for kwicks ul container */
list-style: none;
position: relative;
margin: 0;
padding: 0;
}
.kwicks li{
/* these are required, but the values are up to you (must be pixel) */
width: 190.5px;
height: 280px;
/*do not change these */
display: block;
overflow: hidden;
padding: 0px;  /* if you need padding, do so with an inner div (or implement your own box-model hack) */
}
.fadeout {
display: block;
position: absolute;
right: 0px;
width: 300px;
height: 280px;
z-index: 4;
background: url(http://2.bp.blogspot.com/-Hpw7rL04xUg/UpcpHUx_VBI/AAAAAAAAI6Q/4Ext28l368E/s1600/overlay.png) repeat-y scroll top right;
}
.kwicks.horizontal li {
/* This is optional and will be disregarded by the script.  However, it should be provided for non-JS enabled browsers. */
margin-right: 0px; /*Set to same as spacing option. */
float: left;
}
.kwicks.vertical  li{
/* This is optional and will be disregarded by the script.  However, it should be provided for non-JS enabled browsers. */
margin-bottom: 5px; /*Set to same as spacing option. */
}
.kwicks .excerpt {
position: absolute;
padding: 10px;
bottom: 0px;
display: block;
width: 100%;
}
.excerpt h2 {
margin-bottom: 10px;
padding: 10px;
background: #fff;
color: #000;
opacity: 0.77;
filter:alpha(opacity=77);
}
.excerpt h2 a, .excerpt h2 a:visited {
color: #000;
font-size:16px;
text-transform:uppercase;
}
.kwicks img {
margin: 0;
padding:0;
}
a.more4 {
background: #fff;
opacity: 0.77;
filter:alpha(opacity=77);
color: #000 !important;
padding: 3px 6px;
font-size: 11px;
}
* {
margin: 0;
padding: 0;
}

JavaScript

//<![CDATA[

/*
	Kwicks for jQuery (version 1.5.1)
	Copyright (c) 2008 Jeremy Martin
	http://www.jeremymartin.name/projects.php?project=kwicks
	
	Licensed under the MIT license:
		http://www.opensource.org/licenses/mit-license.php

	Any and all use of this script must be accompanied by this copyright/license notice in its present form.
*/
(function($){$.fn.kwicks=function(n){var p={isVertical:false,sticky:false,defaultKwick:0,event:'mouseover',spacing:0,duration:500};var o=$.extend(p,n);var q=(o.isVertical?'height':'width');var r=(o.isVertical?'top':'left');return this.each(function(){container=$(this);var k=container.children('li');var l=k.eq(0).css(q).replace(/px/,'');if(!o.max){o.max=(l*k.size())-(o.min*(k.size()-1))}else{o.min=((l*k.size())-o.max)/(k.size()-1)}if(o.isVertical){container.css({width:k.eq(0).css('width'),height:(l*k.size())+(o.spacing*(k.size()-1))+'px'})}else{container.css({width:(l*k.size())+(o.spacing*(k.size()-1))+'px',height:k.eq(0).css('height')})}var m=[];for(i=0;i<k.size();i++){m[i]=[];for(j=1;j<k.size()-1;j++){if(i==j){m[i][j]=o.isVertical?j*o.min+(j*o.spacing):j*o.min+(j*o.spacing)}else{m[i][j]=(j<=i?(j*o.min):(j-1)*o.min+o.max)+(j*o.spacing)}}}k.each(function(i){var h=$(this);if(i===0){h.css(r,'0px')}else if(i==k.size()-1){h.css(o.isVertical?'bottom':'right','0px')}else{if(o.sticky){h.css(r,m[o.defaultKwick][i])}else{h.css(r,(i*l)+(i*o.spacing))}}if(o.sticky){if(o.defaultKwick==i){h.css(q,o.max+'px');h.addClass('active')}else{h.css(q,o.min+'px')}}h.css({margin:0,position:'absolute'});h.bind(o.event,function(){var c=[];var d=[];k.stop().removeClass('active');for(j=0;j<k.size();j++){c[j]=k.eq(j).css(q).replace(/px/,'');d[j]=k.eq(j).css(r).replace(/px/,'')}var e={};e[q]=o.max;var f=o.max-c[i];var g=c[i]/f;h.addClass('active').animate(e,{step:function(a){var...