Skip to content

Instantly share code, notes, and snippets.

@neotericdesign
Created October 13, 2010 16:32
Show Gist options
  • Select an option

  • Save neotericdesign/624399 to your computer and use it in GitHub Desktop.

Select an option

Save neotericdesign/624399 to your computer and use it in GitHub Desktop.
//duh
$(document).ready(function(){
$('#recent-activity').tabs();
});
<!-- and your markup needs to look like: -->
<aside id="tabs">
<header>
<h1>News Feeds</h1>
<nav id="feed-chooser">
<span><a href="#news-feed">All News</a></span>
<span><a href="#featured-news-feed">Featured News</a></span>
</nav>
</header>
<ol id="news-feed">
<li>
<time class="feed-item-date" datetime="2010-09-24">9/24:</time>
<header class="feed-item-title">
<a href="#">Grapes roll into season</a>
</header>
<aside class="feed-item-reply-count">
<a href="#"><span class="num">6</span> replies</a>
</aside>
</li>
</ol>
<ol id="featured-news-feed">
<li>
<time class="feed-item-date" datetime="2010-09-24">9/24:</time>
<header class="feed-item-title">
<a href="#">This is featured news instead!</a>
</header>
<aside class="feed-item-reply-count">
<a href="#"><span class="num">6</span> replies</a>
</aside>
</li>
</ol>
</aside>
//on lines 105 & 106, change:
this.list = this.element.find( "ol,ul" ).eq( 0 );
this.lis = $( " > li:has(a[href])", this.list );
// to:
this.list = this.element.find( "nav" ).eq( 0 );
this.lis = $( " > span:has(a[href])", this.list );
// AND! /!\ Change all instances of "li" to "span"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment