This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

jQueryUI Tabs issue

Forum to discuss ExtJS and other JS plugins

jQueryUI Tabs issue

by aechean » Tue Mar 23, 2010 3:51 pm

Hello everyone, I've searched and searched for an answer to this problem, but I can't seem to find one.

I'm new to symfony, and I'm trying to use jQueryUI to set up a tabbed navigation menu and load the pages content in the tab via ajax.

I have it working to a degree, but where I'm running into the problem is that jQueryUI isn't highlighting the tab I'm on when I switch tabs.

Has anyone tried to do this before, or have any suggestions?

Currently I have the navMenu in a partial, and the tab divs are around the code generated by the action.

Huge thanks for any info!
aechean
Junior Member
 
Posts: 6
Joined: Tue Mar 23, 2010 3:45 pm

Re: jQueryUI Tabs issue

by hsostock » Tue Mar 23, 2010 11:45 pm

Hi aechean, can you post your navMenu partial and the javascript you're using to manipulate the tabs?

Thanks,

Hale
hsostock
Member
 
Posts: 96
Joined: Wed Nov 18, 2009 2:35 am

Re: jQueryUI Tabs issue

by aechean » Wed Mar 24, 2010 3:57 pm

Thanks Hale, I figured it out! I was mixing the AJAX and non-AJAX way of doing the tabs, and it was all screwed up. Once I actually re-read the source code, I got it working!

I very much appreciate the help though!
aechean
Junior Member
 
Posts: 6
Joined: Tue Mar 23, 2010 3:45 pm

Re: jQueryUI Tabs issue

by aechean » Wed Mar 31, 2010 4:29 pm

Alright, I lied. Apparently I don't have it working.

I'm trying to use the tabs purely as a navigational menu, loading my pages in the tabs, but being able to bookmark said tabs, and have the address bar correspond with the action I'm executing.

So here is my simple nav partial:

Code: Select all
<div id='tabs'>
    <ul>
      <li id='home'><a href="<?php echo url_for('post/index') ?>" title="Home">Home</a></li>
      <li id='test'><a href="<?php echo url_for('post/test') ?>" title="Test">Test</a></li>
    </ul>
</div>


And the simple tabs intializer:
Code: Select all
$(document).ready(function() {
      $('#tabs').tabs({spinner: ''
   
   
    });
});



My layout just displays $sf_content. I want to display the content for the action I'm executing (currently home or test) in the tab, via ajax, and have the tab be bookmarkable.

I've googled this like 4000 times and I can't find an example of what I'm trying to do. If anyone has a resource they know of, I can look it up, or if you can help, I would greatly appreciate it.

Thank you in advance.

Code: Select all
aechean
Junior Member
 
Posts: 6
Joined: Tue Mar 23, 2010 3:45 pm