aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/base.scss6
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js17
2 files changed, 22 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index e846cfe1b..6b0c1850a 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -1034,6 +1034,12 @@ table.nicetable {
visibility: hidden;
}
+// hide anything with this class if js is NOT working
+.no-js .hidden-nojs {
+ display: none !important;
+ visibility: hidden;
+}
+
/* Front page */
#front-main {
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 490f7f134..a6ae9be21 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -92,7 +92,7 @@ $(function(){
}).data('size', 'full');
}
}
-
+
//heightfix the desktop .content div
if(Modernizr.mq('only screen and (min-width:48em)')) {
if (!($('body').hasClass('frontpage'))){
@@ -300,4 +300,19 @@ $(function(){
$('.form-focus-trigger').on('focus', function(){
$('.form-focus-hidden').fadeIn(500);
});
+
+ /*
+ * Show on click - pretty generic
+ */
+ $('.hideshow-trigger').on('click', function(e){
+ e.preventDefault();
+ var href = $(this).attr('href'),
+ //stupid IE sometimes adds the full uri into the href attr, so trim
+ start = href.indexOf('#'),
+ target = href.slice(start, href.length);
+
+ $(target).removeClass('hidden-js');
+
+ $(this).hide();
+ });
});