I've created a function that toggles a class to change the style of an element when it is selected. However, I'm facing an issue where the new style remains even when another element is selected. Is there a way to make the styling revert back to the original when a new element is selected using this existing function?
<script>
$('.stylingchange').click(function() {
$(this).toggleClass('servicesiconchange');
});
</script>