Jquery Splitter Plugin ((hot)) May 2026

  • Jquery Splitter Plugin ((hot)) May 2026

    .splitter-bar-vertical background-image: none; /* Remove default grip */

    <div id="mySplitter"> <div>Left Pane</div> <div>Right Pane</div> </div> $(function() $('#mySplitter').splitter(); ); This creates a vertical splitter (default) with two panes of equal width. 4. Configuration Options | Option | Type | Default | Description | |--------|------|---------|-------------| | type | string | 'v' | 'v' (vertical) or 'h' (horizontal) | | size | integer/string | null | Initial size of first pane (e.g., 200 , '50%' ) | | minSize | integer | 0 | Minimum size of first pane in pixels | | maxSize | integer | null | Maximum size of first pane | | resizeToWidth | boolean | false | Adjust pane width on window resize | | cookie | string | null | Name of cookie to store splitter position | | onResize | function | null | Callback after resize | | onResizeStart | function | null | Callback when resize starts | | onResizeEnd | function | null | Callback when resize ends | Example with options: $('#mySplitter').splitter( type: 'v', size: 250, // Left pane 250px wide minSize: 100, maxSize: 500, onResize: function(event, ui) console.log('New sizes:', ui.size); ); 5. Creating Horizontal Splitter <div id="horizontalSplitter"> <div>Top Pane</div> <div>Bottom Pane</div> </div> $('#horizontalSplitter').splitter( type: 'h', size: 200 // Top pane height 200px ); 6. Nested Splitters (3+ Panes) To create more than two panes, nest splitters: jquery splitter plugin

    <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="jquery.splitter.css"> <style> body, html height: 100%; margin: 0; padding: 0; #mainSplitter width: 100%; height: 100%; .left-pane background: #f4f4f4; padding: 10px; overflow: auto; .right-pane background: #fff; padding: 10px; overflow: auto; .splitter-bar background: #333; width: 5px; .splitter-bar:hover background: #e67e22; </style> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="jquery.splitter.js"></script> <script> $(function() $('#mainSplitter').splitter( type: 'v', size: 300, minSize: 150, maxSize: 600, cookie: 'mainSplitterPos', onResize: function(e, ui) $('#status').text('Left pane width: ' + ui.size + 'px'); ); ); </script> </head> <body> <div id="mainSplitter"> <div class="left-pane"> <h3>Navigation</h3> <ul><li>Item 1</li><li>Item 2</li></ul> </div> <div class="right-pane"> <h3>Content Area</h3> <p>Drag the splitter bar →</p> <div id="status"></div> </div> </div> </body> </html> 12. Alternatives (if you need more features) | Plugin | Features | |--------|----------| | Split.js | Lightweight, no jQuery dependency, supports multiple panes | | AlloyUI Splitter | More complex, part of YUI but can be used standalone | | GoldenLayout | Full window layout manager (overkill for simple splitters) | Creating Horizontal Splitter &lt

    #mySplitter, .splitter-container width: 100%; height: 500px; /* Fixed or min-height */ $('#horizontalSplitter').splitter( type: 'h'

    #mySplitter > div overflow: auto;

  • .splitter-bar-vertical background-image: none; /* Remove default grip */

    <div id="mySplitter"> <div>Left Pane</div> <div>Right Pane</div> </div> $(function() $('#mySplitter').splitter(); ); This creates a vertical splitter (default) with two panes of equal width. 4. Configuration Options | Option | Type | Default | Description | |--------|------|---------|-------------| | type | string | 'v' | 'v' (vertical) or 'h' (horizontal) | | size | integer/string | null | Initial size of first pane (e.g., 200 , '50%' ) | | minSize | integer | 0 | Minimum size of first pane in pixels | | maxSize | integer | null | Maximum size of first pane | | resizeToWidth | boolean | false | Adjust pane width on window resize | | cookie | string | null | Name of cookie to store splitter position | | onResize | function | null | Callback after resize | | onResizeStart | function | null | Callback when resize starts | | onResizeEnd | function | null | Callback when resize ends | Example with options: $('#mySplitter').splitter( type: 'v', size: 250, // Left pane 250px wide minSize: 100, maxSize: 500, onResize: function(event, ui) console.log('New sizes:', ui.size); ); 5. Creating Horizontal Splitter <div id="horizontalSplitter"> <div>Top Pane</div> <div>Bottom Pane</div> </div> $('#horizontalSplitter').splitter( type: 'h', size: 200 // Top pane height 200px ); 6. Nested Splitters (3+ Panes) To create more than two panes, nest splitters:

    <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="jquery.splitter.css"> <style> body, html height: 100%; margin: 0; padding: 0; #mainSplitter width: 100%; height: 100%; .left-pane background: #f4f4f4; padding: 10px; overflow: auto; .right-pane background: #fff; padding: 10px; overflow: auto; .splitter-bar background: #333; width: 5px; .splitter-bar:hover background: #e67e22; </style> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="jquery.splitter.js"></script> <script> $(function() $('#mainSplitter').splitter( type: 'v', size: 300, minSize: 150, maxSize: 600, cookie: 'mainSplitterPos', onResize: function(e, ui) $('#status').text('Left pane width: ' + ui.size + 'px'); ); ); </script> </head> <body> <div id="mainSplitter"> <div class="left-pane"> <h3>Navigation</h3> <ul><li>Item 1</li><li>Item 2</li></ul> </div> <div class="right-pane"> <h3>Content Area</h3> <p>Drag the splitter bar →</p> <div id="status"></div> </div> </div> </body> </html> 12. Alternatives (if you need more features) | Plugin | Features | |--------|----------| | Split.js | Lightweight, no jQuery dependency, supports multiple panes | | AlloyUI Splitter | More complex, part of YUI but can be used standalone | | GoldenLayout | Full window layout manager (overkill for simple splitters) |

    #mySplitter, .splitter-container width: 100%; height: 500px; /* Fixed or min-height */

    #mySplitter > div overflow: auto;