Skip to content

Instantly share code, notes, and snippets.

@eshiota
Created April 2, 2012 21:33
Show Gist options
  • Save eshiota/2287379 to your computer and use it in GitHub Desktop.
Save eshiota/2287379 to your computer and use it in GitHub Desktop.
No HTML:
<div id="#my-cool-content">
<ul class="tabbed-content" data-name="[NOME EM DA FEATURE]" data-scope="[ID DO CONTAINER COM OS CONTEUDOS]">
<li><a href="#[NOME DA FEATURE]/[NOME DO CONTEUDO]" data-content="[TAB DO CONTEUDO]" data-url="[NOME DO CONTEUDO]">Lorem ipsum</a></li>
<li><a href="#[NOME DA FEATURE]/[NOME DO CONTEUDO]" data-content="[TAB DO CONTEUDO]" data-url="[NOME DO CONTEUDO]">Lorem ipsum</a></li>
</ul>
<div id="[ID DO CONTAINER COM OS CONTEUDOS]">
<div class="tab-content" data-tab="[TAB DO CONTEUDO]">
...
</div>
<div class="tab-content" data-tab="[TAB DO CONTEUDO]">
...
</div>
</div>
</div>
No JS:
var $tabbedContent = $("#my-cool-content").find(".tabbed-content")
, tabbedContentView = new webpesados.views.TabbedContentView($tabbedContent)
;
tabbedContentView.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment