Hello everyone,
I’m getting 10 (!!!!!) “‘$’ is not defined. (no-undef)” errors in the following code:
[CODE]jQuery(document).ready(function() {
// search funtion in navbar
(function(jQuery) {
$(‘#search-button’).on(‘click’, function(e) {
if ($(‘#search-input-container’).hasClass(‘hdn’)) {
e.preventDefault();
$(‘#search-input-container’).removeClass(‘hdn’)
return false;
}
});
$(‘#hide-search-input-container’).on(‘click’, function(e) {
e.preventDefault();
$(‘#search-input-container’).addClass(‘hdn’)
return false;
});
})(jQuery);
// make the squares match height
$(function() {
$(‘.square’).matchHeight({ byRow: false });
});
});
I have been searching for a solution, but to no avail. The most common causes of and solutions to this error that I checked:
1. load jQuery BEFORE your own scripts: CHECK
2. replace $ by jQuery: CHECK
3. install jQuery migrate: CHECK
But still it’s going berserk over such little code. Does any of you experts has advice on how to analyse this issue?
Thank you very much