Created
July 31, 2008 04:59
-
-
Save code/3407 to your computer and use it in GitHub Desktop.
Adding a simple tab view, nothing fancy just easy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-# File: application.html.haml | |
-# Include YUI in your head | |
=yui_loader_includes | |
-# File: _tab_view.html.haml | |
-# To use a component in one of your views, call yui_require | |
-# Components are loaded using the yui loader, dependencies are managed | |
-# Any code added to yui_script filter will be rolled into single init function and outputted with the loader | |
-yui_require :tabview | |
:yui_script | |
UI.demoTabView = new YAHOO.widget.TabView('demo_tab_view'); | |
#demo_tab_view.yui-navset | |
%ul.yui-nav | |
%li=link_to tag(:em, 'Details'), '#tab_details' | |
%li.selected=link_to tag(:em, 'Content'), '#tab_content' | |
.yui-content | |
#tab_details=render :partial=>'details' | |
#tab_content=render :partial=>'content' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment