From 48379dd2e74acb9fb744f817072fc8e8705a76bf Mon Sep 17 00:00:00 2001 From: Eike Foken Date: Wed, 28 Sep 2011 15:51:42 +0200 Subject: [PATCH] Add check for tabs to be sure that an ID is given as href --- assets/js/scattport.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/scattport.js b/assets/js/scattport.js index 19c1fc9..9b8126c 100644 --- a/assets/js/scattport.js +++ b/assets/js/scattport.js @@ -122,8 +122,12 @@ $(document).ready(function() { $('.tab_content').hide(); // hide all tab content var activeTab = $(this).find('a').attr('href'); - $(activeTab).fadeIn(); // fade in the active tab content - return false; + if (activeTab.match(/^#.*/g)) { + $(activeTab).fadeIn(); // fade in the active tab content + return false; + } else { + return true; + } }); /*