Merge pull request #1 from paulirish/master

Included the JS refinement from Mr. Paul Irish :)
This commit is contained in:
dhgamache 2011-05-16 18:12:28 -07:00
commit 25e93dba69

View File

@ -10,8 +10,8 @@ $(document).ready(function() {
/* Tabs Activiation
================================================== */
var tabs = $('ul.tabs');
tabsContent = $('ul.tabs-content')
var tabs = $('ul.tabs'),
tabsContent = $('ul.tabs-content');
tabs.each(function(i) {
//Get all tabs
@ -19,8 +19,7 @@ $(document).ready(function() {
tab.click(function(e) {
//Get Location of tab's content
var contentLocation = $(this).attr("href")+"Tab"
contentLocation = contentLocation;
var contentLocation = $(this).attr("href") + "Tab";
//Let go if not a hashed one
if(contentLocation.charAt(0)=="#") {
@ -32,8 +31,8 @@ $(document).ready(function() {
$(this).addClass('active');
//Show Tab Content
$(contentLocation).parent('.tabs-content').children('li').css({"display":"none"});
$(contentLocation).css({"display":"block"});
$(contentLocation).parent('.tabs-content').children('li').hide();
$(contentLocation).show();
}
});