Dynamically Add and Remove HTML Tags on Mouse Hover

this jQuery code snippet is used for handling hover events on elements with the class “on-hover-add-html-tag.” When an element with this class is hovered over, it adds a <span> tag with the id “span-tag” after the hovered element. When the hover event is finished, it removes the previously added <span> tag.
jQuery(‘.on-hover-add-html-tag’).hover(function () {
jQuery(this).after(‘<span id=”span-tag”>’);
}, function () {
jQuery(“#span-tag”).remove();
});