my Javascript (jQuery) is working fine in newer browsers (Chrome, Firefox, safari 10+) but not in slightly older Browers (Safari 9, IE 11..).
It however does work fine, when I include it directly on the page and dont try to load it from an external file. I have been at it for hours and I cant figure out what the problem is..
My Javascript:
$( document ).ready(function($) {
$(".monatsInput").on("click", function () {
console.log("clicked");
$(".monatsWahl").css("border-color", "lightgrey")
$(this).parent().css("border-color", "#4CA3D8");
var newPrice = $(this).val();
$(this).parent().parent().parent().parent().find(".angebotsPreis").html(newPrice);
})
// Mobile Nav
// --------------------------------------------------
// --------------------------------------------------
$("#burgerNav").on("click", function () {
$(".navList").toggle("display");
});
// Back to previous page
function goBack() {
window.history.back();
}
$(document).foundation();
})
Im not sure which part of the HTML to include, so the entire page can be viewed here:
I hope someone has an idea.
Thanks