Welcome Guest, Not a member yet? Register   Sign In
CI & JQuery UI
#1

[eluser]evstevemd[/eluser]
Hi guys,
I want to make a tabbed app with JQuery and JQuery UI.
I know this is not strictly CI question but a lot of guys here plays with CI & JQUi.
So how can I make a tabbed app with the two?


Thanks
#2

[eluser]gigas10[/eluser]
Start here

http://jqueryui.com/demos/tabs/

Shouldn't be too hard, I've done it a few times.
#3

[eluser]pickupman[/eluser]
Should be the exact same as in php/html. Depending on the context of the tabs, but you may find it useful to create views for each of the tabs. You could have master tab view with the jQueryUI tab markup, and load each view into each tab.
Code:
//Controller
$data['tab1'] = $this->load->view('tab1', $data, TRUE);
$data['tab2'] = $this->load->view('tab2', $data, TRUE);
$data['tab3'] = $this->load->view('tab3', $data, TRUE);

$this->load->view('master_tab_view', $data);

//Master tab view
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Nunc tincidunt</a></li>
        <li><a href="#tabs-2">Proin dolor</a></li>
        <li><a href="#tabs-3">Aenean lacinia</a></li>
    </ul>
    <div id="tabs-1">
        &lt;?php echo $tab1;?&gt;
    </div>
    <div id="tabs-2">
        &lt;?php echo $tab2;?&gt;
    </div>
    <div id="tabs-3">
        &lt;?php echo $tab3;?&gt;
    </div>
</div>

The reason for doing is this is because if go to implement ajax, you could re-render one of the tabs, and update the tab(DOM).




Theme © iAndrew 2016 - Forum software by © MyBB