JSFiddle - React, Tailwind, and code Playground

by tiagocarvalho

HTML

<script type="text/javascript" src="http://demo.takien.com/js/libs/jquery.jscrollpane.min.js"></script><script type="text/javascript" src="http://demo.takien.com/js/libs/jquery.mousewheel.js"></script>
<script type="text/javascript" src="http://demo.takien.com/js/libs/jquery.mousewheel.js"></script>
<br /><br />
    <div class="content-area">
    <p><strong>Hover over this area and you will see scrollbar appears in the right</strong></p>
    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

    <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p>
     
    <p>
    Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum...

CSS

.content-area{
            height:200px;
font-family:verdana;
    font-size:12px;
    background:#fff;
    text-align:justify;
        }

.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag {
    float: left;
    height: 100%;
}



.jspCorner {
    display:none
}





/*
 * CSS Styles that are needed by jScrollPane for it to operate correctly.
 *
 * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
 * may not operate correctly without them.
 */

.jspContainer
{
    overflow: hidden;
    position: relative;
}

.jspPane
{
    position: absolute;
}

.jspVerticalBar
{
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: red;
}

.jspHorizontalBar
{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
    background: red;
}

.jspVerticalBar *,
.jspHorizontalBar *
{
    margin: 0;
    padding: 0;
}

.jspCap
{
    display: none;
}

.jspHorizontalBar .jspCap
{
    float: left;
}

.jspTrack
{
    background: #dde;
    position: relative;
}

.jspDrag
{
    background: #bbd;
    position: relative;
    top: 0;
    left: 0;
    cursor: pointer;
}

.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag
{
    float: left;
    height: 100%;
}

.jspArrow
{
    background: #50506d;
    text-indent: -20000px;
    display: block;
    cursor: pointer;
}

.jspArrow.jspDisabled
{
    cursor: default;
    background: #80808d;
}

.jspVerticalBar .jspArrow
{
    height: 4px;
}

.jspHorizontalBar .jspArrow
{
    width: 4px;
    float: left;
    height: 100%;
}

.jspVerticalBar .jspArrow:focus
{
    outline: none;
}

.jspCorner
{
    background: #eeeef4;
    float: left;
    height: 100%;
}

/* Yuk! CSS Hack for IE6 3 pixel bug :( */
* html .jspCorner
{
    margin: 0 -3px 0 0;
}

/*scrollpane custom CSS*/
.jspVerticalBar {
    width: 6px;
    background: transparent;
    right:0px;
}

.jspHorizontalBar {
    bottom: 0px;
    width: 100%;
    height:...

JavaScript

$(document).ready(function(){
    $('.content-area').jScrollPane({
    horizontalGutter:5,
    verticalGutter:5,
            verticalDragMinHeight: 10,
            //verticalDragMaxHeight: 10,
            horizontalDragMinWidth: 40,
            horizontalDragMaxWidth: 20,
    'showArrows': false
    });
    
    $('.jspDrag').hide();
    $('.jspScrollable').mouseenter(function(){
    
     $('.jspDrag').stop(true, true).fadeIn('slow');
    });
    $('.jspScrollable').mouseleave(function(){
        $('.jspDrag').stop(true, true).fadeOut('slow');
    });

});