CodeIgniter Forums

Full Version: Jquery tabs (tabify) in Code Igniter.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Hello,

I'm trying to use Tabify:
http://unwrongest.com/projects/tabify/

IIt works ok without Code Igniter. But, when I add it to CI and put code to the view
adding only in header
Code:
<base href="<?php echo $this->config->item('base_url') ?>" />

so the paths are correct then it does not work (tabs are not being changed). Is there something I'm missing?

Thank you for hints.

El Forum

[eluser]Salvador P.[/eluser]
Maybe the Javascript is not loaded. Check the Jquery library is included in the page you are loading the tabs.

El Forum

[eluser]Unknown[/eluser]
Javascript is loaded. Anchor urls are working too

Code:
<ul id="tabs_navi">
        <li class="active">&lt;?php echo anchor(current_url()."#tabs01","Opis obiektu",array('class'=>'tabs_a','id'=>'tabs_active'));?&gt; </li>
        <li>&lt;?php echo anchor(current_url()."#tabs02","Galeria zdjęć",array('class'=>'tabs_a'));?&gt; </li>
        <li>&lt;?php echo anchor(current_url()."#tabs03","Mapka dojazdu",array('class'=>'tabs_a'));?&gt; </li>
        <li>&lt;?php echo anchor(current_url()."#tabs04","Formularz kontaktowy",array('class'=>'tabs_a'));?&gt; </li>
       </ul>

I think the problem could be with url ?

Working without CI is:
Code:
http://HERE_IS_URL/obiekt.php#tabs01

And with Code Igniter it is (not working)
Code:
http://HERE_IS_URL/obiekt/index/500#tabs01

I have browsed this forum and found out that many people had similar problems.

El Forum

[eluser]Salvador P.[/eluser]
I've never used Tabify, maybe the problem is with the url, try to put some alerts in the javascript code which changes the tab, to see if it's picking the "#tabs01" or picking "500#tabs1".

Check if you can use base_url() instead of current_url().

Hope this helps.