Here is the code snippet:
$("#radioGroup").click(function() {
$("#groupSpan").css("display", "block");
$("#advisorSpan").css("display", "none");
});
And for the second button of the radio group:
$("#radioAdvisor").click(function() {
$("#groupSpan").css("display", "none");
$("#advisorSpan").css("display", "block");
});
Although this code works fine initially, a slight issue arises when scrolling between clicking the radio buttons. The spans are displayed in incorrect positions - essentially appearing where they should have been before scrolling, which looks quite strange as they overlap unrelated elements.
Could anyone provide assistance with this problem?