Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1>jquery-rsOverview plugin demo</h1>
<p>Make your own horizontal, vertical or bidirectional scroll bar.</p>

<aside id='doc'></aside> <!-- bidirectional scroll bar for the whole document -->

<div id='overflowed'>
  <img src='' width='653' height='436'>
<!-- vertical, horizontal and bidirectional scroll bars -->
<aside id='elementVert'></aside>
<aside id='elementHoriz'></aside>
<aside id='element'></aside>
<a class="github" href="" target="github">More on GitHub</a>



                #doc {
  position: fixed;
  width: 5em;
  height: 15em;
  right: 1em;
  top: 1em;

#overflowed {
  display: inline-block;
  width: 30em;
  height: 20em;
  border: 1px grey dashed;
  overflow: hidden; /* hide the native scroll bars. I want to use custom ones instead */

#element {
  position: absolute;
  left: 32em;
  top: 10em;
  width: 10em;
  height: 8em;

#elementHoriz {
  position: absolute;
  left: .5em;
  width: 29em;
  top: 26.2em;
  height: 1em;

#elementVert {
  position: absolute;
  top: 7.2em;
  left: 29.6em;
  height: 19em;
  width: 1em;  

.content {
  background-color: rgba(200, 100, 100, .5);
  cursor: crosshair;

.viewport {
  background-color: rgba(0, 0, 0, .5);
  cursor: move;

#element .content {
  background-image: url('');
  background-size: cover;
  overflow: hidden; /* to hide the box-shadow below */

#element .viewport {
  background-color: transparent;
  box-shadow: 0 0 0 3em rgba(255, 255, 255, .4);

a.github {
  position: absolute;
  top: 1em;
  right: 1em;



                // add some content to the page
var $body = $('body').css('white-space', 'nowrap');
for (var i = 0; i < 250; ++i) {
  $body.append('<p>' + new Array(15).join('The quick, brown fox jumps over a lazy dog. --' + i + '--') + '</p>');

// bidirectional scroll bar for the whole document

// bidirectional scroll bar for the #overflowed element
  monitor: $('#overflowed')

// vertical scroll bar for the #overflowed element
  monitor: $('#overflowed'),
  direction: 'vertical'

// horizontal scroll bar for the #overflowed element
  monitor: $('#overflowed'),
  direction: 'horizontal'