aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorJosh Angell <josh@supercooldesign.co.uk>2012-02-20 12:59:37 +0000
committerJosh Angell <josh@supercooldesign.co.uk>2012-02-20 12:59:37 +0000
commit0286bfb552d0be4db25c1eec455a29c15ab6307a (patch)
tree0bbd53915b9b8be747c140c4055940130f928a21 /web/js
parent3551545018c4c424cf84c3388df2c265d98615bc (diff)
Bunch of IE fixes
Signed-off-by: Josh Angell <josh@supercooldesign.co.uk>
Diffstat (limited to 'web/js')
-rw-r--r--web/js/fixmystreet.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index d88d66db4..10390f40e 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -56,15 +56,20 @@ function heightFix(elem1, elem2, offset){
*/
function tabs(elem)
{
- var target = elem.attr('href');
+ 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(!$(target).hasClass('open'))
{
//toggle class on nav
$('.tab-nav .active').removeClass('active');
elem.addClass('active');
+
//hide / show the right tab
- $('.tab.open').removeClass('open').hide();
- $(target).addClass('open').show();
+ $('.tab.open').hide().removeClass('open');
+ $(target).show().addClass('open');
}
}