Create dynamic Tabs using jQuery and css

I am going to explain the easy and simple process to Create dynamic Tabs using jQuery and css. Tabs makes a sense when you have a limited screen space and you want display the huge data.

CSS Code

Javascript Code

Html Code<html lang=”en”>
<head>
<meta charset=”utf-8″ />
<title> www.freewebmentor.com | Create dynamic Tabs using jQuery and css</title>
</head>
<body>
<div id=”dialog” title=”Tab data”>
<form>
<fieldset class=”ui-helper-reset”>
<label for=”tab_title”>Title</label>
<input type=”text” name=”tab_title” id=”tab_title” value=”” class=”ui-widget-content ui-corner-all” />
<label for=”tab_content”>Content</label>
<textarea name=”tab_content” id=”tab_content” class=”ui-widget-content ui-corner-all”></textarea>
</fieldset>
</form>
</div>

<button id=”add_tab”>Add Tab</button>

<div id=”tabs”>
<ul>
<li><a href=”#tabs-1″>Nunc tincidunt</a> <span class=”ui-icon ui-icon-close”>Remove Tab</span></li>
</ul>
<div id=”tabs-1″>
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>
</div>

</body>
</html>

See The Demo

demo

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


Article Tags: , , , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.