I change the jquery verison from 3.6.0 to 3.6.3 and I get error when I use the load function.
I have the below code
$(document).ready(function() {
$('.nav, #menu').click(function(e) {
e.preventDefault();
$('#content').load($(this).attr('href'));
});
});
and I get the below error
TypeError: Cannot read properties of undefined (reading 'indexOf')
at jQuery.fn.load (jquery-3.6.3.js:10473:13)
at HTMLUListElement.<anonymous> (dashboard.php:64:19)
at HTMLUListElement.dispatch (jquery-3.6.3.js:5494:27)
at elemData.handle (jquery-3.6.3.js:5298:28)
If I change the jquery version to 3.6.0 the error disappear. If I change the version of jquery in 3.6.1 or 3.6.2 or 3.6.3 I get the above error.
Is anything wrong with my code?
I tried different versions of jquery and I get the same error.