UNPKG

rich-filemanager

Version:

Highly customizable open-source file manager

108 lines (96 loc) 3.75 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Vertical Splitter</title> <script type="text/javascript" src="../lib/jquery.js"></script> <script type="text/javascript" src="../splitter.js"></script> <!-- General page styles (not critical to the demos) --> <link rel="stylesheet" type="text/css" href="main.css" /> <style type="text/css" media="all"> body { padding: 10px; } /* * Splitter container. Set this to the desired width and height * of the combined left and right panes. In this example, the * height is fixed and the width is the full width of the body, * less the margin on the splitter itself. */ #MySplitter { height: 400px; margin: 1em 3em; border: 4px solid #bdb; /* No padding allowed */ } /* * Left-side element of the splitter. Use pixel units for the * min-width and max-width; the splitter plugin parses them to * determine the splitter movement limits. Set the width to * the desired initial width of the element; the plugin changes * the width of this element dynamically. */ #LeftPane { background: #efe; overflow: auto; /* No margin or border allowed */ } /* * Right-side element of the splitter. */ #RightPane { background: #f8fff8; overflow: auto; /* No margin or border allowed */ } /* * Splitter bar style; the .active class is added when the * mouse is over the splitter or the splitter is focused * via the keyboard taborder or an accessKey. */ #MySplitter .splitter-bar-vertical { width: 6px; background: #aca url(img/vgrabber.gif) no-repeat center; } #MySplitter .splitter-bar-vertical.active { background: #da8 url(img/vgrabber.gif) no-repeat center; opacity: 0.7; } </style> <script type="text/javascript"> $().ready(function() { $("#MySplitter").splitter({ type: "v", outline: true, minLeft: 100, sizeLeft: 150, minRight: 100, resizeToWidth: true, accessKey: 'I' }); }); </script> </head> <body> <h1>jQuery Vertical Splitter</h1> <p> This example demonstrates the use of an <em>outline</em> splitbar that reduces the number of reflows required. When the mouse is used to move the splitbar, the actual splitbar is not repositioned until the mouse is released. This can improve performance significantly when the splitter contains complex content. </p> <p> <a href="index.html">See the splitter documentation</a> </p> <div id="MySplitter"> <div id="LeftPane"> <p>This is the left side of the vertical splitter. Typically you might use this side for a navigational display of some data that is related to the right side.</p> <p>Using CSS styles you can control the look of the splitter, such as its color, width, and appearance when selected. Or, you can specify most options when you call the plugin to create the splitter.</p> </div> <div id="RightPane"> <p>This is the right side of the vertical splitter. Usually this side will be wider than the left side, but that's up to you. The left pane of this demo was set to be 150 pixels wide in the stylesheet, which is why the right pane is initially larger. If you don't specify a width for either panes when the splitter is created, the two panes will be equal width.</p> <p>The splitter plugin supports the use of the keyboard to move the splitbar via the browser's accessKey feature. To move the splitbar in IE or Firefox, press <kbd>Alt-Shift-I</kbd>, then press the arrow keys. To unfocus the splitbar, press <kbd>Tab</kbd>. In Opera, press <kbd>Shift-Esc</kbd> and then the letter <kbd>I</kbd>; remove focus with <kbd>Esc</kbd>.</p> </div> </div> </body> </html>