mirror of
https://github.com/silverstripe/silverstripe-simple
synced 2024-06-18 10:31:36 +02:00
Fix mix of tab / space whitespace and missing var declaration
This commit is contained in:
parent
84c1215f91
commit
c61d3e2363
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user