Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zwacky/codeigniter_tab_builder

CodeIgniter library to build uniform tab elements with bootstrap styling
https://github.com/zwacky/codeigniter_tab_builder

Last synced: 5 days ago
JSON representation

CodeIgniter library to build uniform tab elements with bootstrap styling

Awesome Lists containing this project

README

        

Codeigniter Tab Builder
=======================

CodeIgniter library to build uniform tab elements with bootstrap styling.

Functions
=========

add_tabs($tabs)
---------------
* **$tabs** array adds a new tab. array must contain **id** and **name**.

start_tab()
-----------
starts the wrapper for all the tab contents

start_tab_content($id, $is_active)
----------------------------------
starts the content of a specific tab.
* **$id** string refers to the tab id, that will be activated upon click.
* **$is_active** boolean whether the tab should be shown at first

end_tab_content()
-----------------
ends the specific tab content.

end_tab()
---------
ends all tab contents all together.

Example
=======

within the controller:

$this->load->library('tab_builder');

within the view:

"tabContract{$idx}", 'name' => "Tab {$idx}"));
}
$this->tab_builder->add_tabs($_tabs);
?>

tab_builder->start_tab();

foreach (array(1, 2, 3) as $idx) {
$this->tab_builder->start_tab_content("tab{$target->contract_id}", ($idx == 1));
?>


tab content


tab_builder->end_tab_content();
} // end foreach

$this->tab_builder->end_tab();
?>