Pages

Friday 1 February 2013

Creating new tabs,closing tab,showing tabs,loading contents in tab and more with Bootstrap tabs


Twitter Bootstrap tabs are very light weight and very easy to use with few lines on code.But if you want perform operations like adding new tab ,adding close button to tab and removing tabs then you need to customise as per the requirement.
Below is a sample example which will allow you to perform below operations :
  • Adding new tab
  • Deleting tab
  • Showing tab
  • Adding close icon to tab
  • Getting element from current tab ( example : if there are two tabs having  textarea with same id or same class name then when $("#someId") will return both the text area from these two tabs this method will take care of this )
Note This example uses bootstrap v 2.2.2 and jquery v1.9.
Download Example Here
Below is demo: (Run below fiddle in full screen to see the proper output )


Click below links to see jsfiddle demo :
 Download Example Here

If you find this post useful please share and comments. Thanks you :)