开发者

Symfony + JQueryUI Tabs navigation menu question

开发者 https://www.devze.com 2022-12-25 19:58 出处:网络
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.

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:

<开发者_StackOverflow社区;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:

$(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.


This will make your tabs load using ajax

<div id='tabs'> 
  <ul> 
    <li title='home'><a href="<?php echo url_for('post/index') ?>" title="Home">Home</a></li> 
    <li title='test'><a href="<?php echo url_for('post/test') ?>" title="Test">Test</a></li> 
  </ul> 
  <div id="home">home content here</div>
  <div id="test">test content here</div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号