parent wrapper resizer - Free Download Auto Adjust Parent Width Based On Child Widths - Wrapper Resizer

Free Download Auto Adjust Parent Width Based On Child Widths – Wrapper Resizer

Posted on

This time I will share jQuery Plugin and tutorial about Auto Adjust Parent Width Based On Child Widths – Wrapper Resizer, hope it will help you in programming stack.

parent wrapper resizer - Free Download Auto Adjust Parent Width Based On Child Widths - Wrapper Resizer
File Size: 4.34 KB
Views Total: 210
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Wrapper Resizer is a jQuery element resize plugin that automatically resizes parent/wrapper/container width so that all children are covered.

Suitable for fixed-width containers where the width of child elements is variable.

How to use it:

1. Download and insert the Wrapper Resizer plugin’s script jquery-plugin-wrapper-resizer.js after jQuery.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/jquery-plugin-wrapper-resizer.js"></script>

2. Attach the function wrapChilds to the parent container and the plugin will do the rest.

01 <div class="wrapper">
02   <table class="my-table table table-bordered table-striped">
03     <tr>
04       <th>Header Text</th>
05       <th>Col 1</th>
06       <th>Col 2</th>
07       <th>Col 3</th>
08       <th>Col 4</th>
09       <th>Header Text</th>
10     </tr>
11     <tr>
12       <td>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  </td>
13       <td>some data</td>
14       <td>some data</td>
15       <td>some data</td>
16       <td>some data</td>
17       <td>Quisque est ex, pulvinar et aliquet eu, aliquet sit amet sem. </td>
18     </tr>
19   </table>
20 </div>
1 .wrapper {
2   width: 10px;
3   /* more styles here */
4 }
1 window.onload=function(){
2   $('div.wrapper').wrapChilds();
3 }

This awesome jQuery plugin is developed by earth-the-home. For more Advanced Usages, please check the demo page or visit the official website.