$('#cont-one').on('click', function(event) {
$("#one-cont").addClass("activecont")
$("#two-cont").removeClass("activecont")
$("#three-cont").removeClass("activecont")
$("#four-cont").removeClass("activecont")
event.preventDefault();
});
$('#cont-two').on('click', function(event) {
$("#one-cont").removeClass("activecont")
$("#two-cont").addClass("activecont")
$("#three-cont").removeClass("activecont")
$("#four-cont").removeClass("activecont")
event.preventDefault();
});
$('#cont-three').on('click', function(event) {
$("#one-cont").removeClass("activecont")
$("#two-cont").removeClass("activecont")
$("#three-cont").addClass("activecont")
$("#four-cont").removeClass("activecont")
event.preventDefault();
});
$('#cont-four').on('click', function(event) {
$("#one-cont").removeClass("activecont")
$("#two-cont").removeClass("activecont")
$("#three-cont").removeClass("activecont")
$("#four-cont").addClass("activecont")
event.preventDefault();
});
});
[
$("#one-cont"),
$("#two-cont"),
$("#three-cont"),
$("#four-cont"),
]
.forEach((target, i, tabs) => target.on(
'click',
(event) => {
tabs.forEach(tab => tab.removeClass("activecont"));
target.addClass("activecont");
event.preventDefault();
},
));