aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJosh Angell <josh@supercooldesign.co.uk>2012-02-28 10:35:57 +0000
committerJosh Angell <josh@supercooldesign.co.uk>2012-02-28 10:35:57 +0000
commitf6a273de86aec80ea689c3b26a7be03165885ce6 (patch)
tree868ee23c82d9da86f3d4bcc7f1d72df58d1a3919 /web
parent0377425491bdcf9425607fa45bf59b4de710177f (diff)
Add show on click to the 'Wards' on the council reports page
Signed-off-by: Josh Angell <josh@supercooldesign.co.uk>
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();
+ });
});