How to arrange the code so that when you click on any menu item, you delete a span with a cross and add a green check mark to the place of it, and that if you switch, it changes as expected. Only an open menu item should display a check mark.
$("h3:first").addClass("active"); $("p:not(:first)").hide(); $("h3").click(function () { $('.accordion').toggleClass('#two'); $(this).next("p").slideToggle("slow") .siblings("p:visible").slideUp("slow"); $(this).toggleClass("active"); $(this).siblings("h3").removeClass("active").addClass('h3 > span'); }