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