aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 2e5ef2594..c192db8fa 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -54,13 +54,16 @@ function heightFix(elem1, elem2, offset){
*
* elem: trigger element, must have an href attribute (so probably needs to be an <a>)
*/
-function tabs(elem)
-{
+function tabs(elem, indirect) {
var href = elem.attr('href');
//stupid IE sometimes adds the full uri into the href attr, so trim
var start = href.indexOf('#'),
target = href.slice(start, href.length);
+ if (indirect) {
+ elem = $(target + '_tab');
+ }
+
if(!$(target).hasClass('open'))
{
//toggle class on nav
@@ -310,6 +313,10 @@ $(function(){
e.preventDefault();
tabs($(this));
});
+ $('.tab_link').click(function(e) {
+ e.preventDefault();
+ tabs($(this), 1);
+ });
/*
* Skip to nav on mobile