diff options
author | Mark Longair <mhl@pobox.com> | 2012-11-02 11:48:50 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2012-11-02 11:49:33 +0000 |
commit | 9220d642f5e40b2d69607ca583a0117be5afe3cd (patch) | |
tree | 197f0c4c8ac197c346a1647b7c3031ec54e868b0 /www/js | |
parent | 1be9c50001d944413dd9685f93b1e5308bd131c3 (diff) |
Make an "if / else if / else" easier to read
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/fixmystreet.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/www/js/fixmystreet.js b/www/js/fixmystreet.js index ce79214..c0fe437 100644 --- a/www/js/fixmystreet.js +++ b/www/js/fixmystreet.js @@ -89,10 +89,16 @@ $(function(){ var last_type; $(window).resize(function(){ var type = $('#site-header').css('borderTopWidth'); - if (type == '4px') { type = 'mobile'; } - else if (type == '0px') { type = 'desktop'; } - else { return; } - if (last_type == type) { return; } + if (type == '4px') { + type = 'mobile'; + } else if (type == '0px') { + type = 'desktop'; } + else { + return; + } + if (last_type == type) { + return; + } if (type == 'mobile') { $html.addClass('mobile'); $('#map_box').prependTo('.content').css({ |