From 6da48f64c3c132261240991e827cbd13349c6339 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 1 Mar 2012 19:32:51 -0300 Subject: [PATCH] Switched to 2-space indentation. --- javascripts/tabs.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/javascripts/tabs.js b/javascripts/tabs.js index 9b5f4dc..ca8fdbe 100644 --- a/javascripts/tabs.js +++ b/javascripts/tabs.js @@ -9,21 +9,18 @@ */ $('body').on('click', 'ul.tabs > li > a', function(e) { + //Get Location of tab's content + var contentLocation = $(this).attr('href'); - //Get Location of tab's content - var contentLocation = $(this).attr('href'); + //Let go if not a hashed one + if(contentLocation.charAt(0)=="#") { + e.preventDefault(); - //Let go if not a hashed one - if(contentLocation.charAt(0)=="#") { + //Make Tab Active + $(this).parent().siblings().children('a').removeClass('active'); + $(this).addClass('active'); - e.preventDefault(); - - //Make Tab Active - $(this).parent().siblings().children('a').removeClass('active'); - $(this).addClass('active'); - - //Show Tab Content & add active class - $(contentLocation).show().addClass('active').siblings().hide().removeClass('active'); - - } + //Show Tab Content & add active class + $(contentLocation).show().addClass('active').siblings().hide().removeClass('active'); + } });