Resize Chrome Style Stretchy Tabs for jQuery UI

Stretchy Tabs is a Chrome-style tab resizing for jQuery UI tabs that allows you to add, close, drag, and drop buttons to rearrange tabs just like Chrome tabs.

Must Read:  Material UI Touch-Swipe Tabs Component for Vue 3

How to make use of it:

1. Include the wanted jQuery and jQuery UI libraries on the webpage.

<link rel="stylesheet" href="/path/to/jquery-ui.css">
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to//jquery-ui.min.js"></script>

2. Include the jQuery extensions of your selection after the jQuery library.

<!-- Core -->
<script src="ui.tabs.stretchy-tabs.js"></script>
<link rel="stylesheet" href="ui.tabs.stretchy-tabs.css" />

<!-- Closable Extension -->
<script src="lib/ui.tabs.closable.js"></script>

<!-- Add Tab Extension -->
<script src="lib/ui.tabs.addTab.js"></script>

3. Create a jQuery UI tabs widget on the webpage.

<div class="tabpanel">
    <li><a href="#tabs-1" class="closable">Tab 1</a></li>
    <li><a href="#tabs-2" class="closable">Tab 2</a></li>
    <li><a href="#tabs-3" class="closable">Tab 3</a></li>
  <div id="tabs-1">
    <p>Content 1</p>
  <div id="tabs-2">
    <p>Content 2</p>
  <div id="tabs-3">
    <p>Content 3</p>

4. The JavaScript to boost the jQuery UI tabs widget.

$( ".tabpanel" ).tabs({
  closable: true, 
.find( ".ui-tabs-nav" ).sortable({
  distance: 10

5. API strategies.

// add a new tab
$(".tabs").tabs("add", "new tab", "content goes here");

// remove a tab
$(".tabs").tabs("remove", index);

6. Event handlers.

$(".tabs").on("tabsbeforeremove", function(){
  // ...

$( ".tabs" ).on("tabsremove", function(){
  // ...

$( ".tabs" ).on("tabsadd", function(){
  // ...

See Also –

Accessible, Responsive, and Freely Redesign Tabs Plugin | Skeletabs
Easy Communication Between Tabs for Vue 2.x | vue-tabevents
Add Another Vanilla JavaScript Tabbed Content With Equal Height | sv-tabs-js

See Demo And Download

Official Website(adamjimenez): Click Here

This superior jQuery/javascript plugin is developed by adamjimenez. For extra Advanced Usage, please go to the official website.

Related Posts


Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…


HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….


CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…


How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…


Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…


Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…

Leave a Reply

Your email address will not be published. Required fields are marked *