Fix mix of tab / space whitespace and missing var declaration

This commit is contained in:
Stig Lindqvist 2014-03-07 14:20:14 +13:00
parent 84c1215f91
commit c61d3e2363

View File

@ -1,7 +1,7 @@
jQuery.noConflict(); jQuery.noConflict();
(function($) {     (function($) {    
   $(document).ready(function() { $(document).ready(function() {
/* removes text from search form on focus and replaces it on unfocus - if text is entered then it does not get replaced with default on unfocus */ /* removes text from search form on focus and replaces it on unfocus - if text is entered then it does not get replaced with default on unfocus */
$('#SearchForm_SearchForm_action_results').val('L'); $('#SearchForm_SearchForm_action_results').val('L');
@ -36,23 +36,20 @@ jQuery.noConflict();
if ((header_w < elements_w) || ($(window).width() <= 768)) { if ((header_w < elements_w) || ($(window).width() <= 768)) {
$('body').addClass('tablet-nav'); $('body').addClass('tablet-nav');
} } else {
else {
$('body').removeClass('tablet-nav'); $('body').removeClass('tablet-nav');
} }
mobile_old = mobile; var mobile_old = mobile;
if ($('#media-query-trigger').css('visibility') == 'hidden') { if ($('#media-query-trigger').css('visibility') == 'hidden') {
mobile = false; mobile = false;
} } else {
else {
mobile = true; mobile = true;
} }
if (mobile_old != mobile) { if (mobile_old !== mobile) {
changed = true; changed = true;
} } else {
else {
changed = false; changed = false;
} }
} }
@ -65,8 +62,7 @@ jQuery.noConflict();
if (!mobile) { if (!mobile) {
menu.show(); menu.show();
searchBar.show(); searchBar.show();
} } else {
else {
if (changed) { if (changed) {
menu.hide(); menu.hide();
searchBar.hide(); searchBar.hide();
@ -84,8 +80,6 @@ jQuery.noConflict();
searchBar.slideUp(); searchBar.slideUp();
menu.slideToggle(200); menu.slideToggle(200);
}); });
} }
});
   });
}(jQuery)); }(jQuery));