diff --git a/javascripts/app.js b/javascripts/app.js index c5222c3..b64de1e 100644 --- a/javascripts/app.js +++ b/javascripts/app.js @@ -15,11 +15,11 @@ $(document).ready(function() { tabs.each(function(i) { //Get all tabs - var tab = $(this).children('li').children('a'); + var tab = $(this).find('a'); tab.click(function(e) { //Get Location of tab's content - var contentLocation = $(this).attr("href") + "Tab"; + var contentLocation = this.href + "Tab"; //Let go if not a hashed one if(contentLocation.charAt(0)=="#") { @@ -31,8 +31,7 @@ $(document).ready(function() { $(this).addClass('active'); //Show Tab Content - $(contentLocation).parent('.tabs-content').children('li').hide(); - $(contentLocation).show(); + $(contentLocation).show().siblings().hide(); } });