Create dynamic Tabs using jQuery and css

| Last Updated: | In: HTML / CSS, Javascript & Ajax


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


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:

Tags: , , , , , ,