Skip to content Skip to sidebar Skip to footer

Addeventlistener Duplicating Select Options Javascript

I created a javascript function to copy data from an input on another jQuery tab to a Summary tab. I am having an issue with duplication with a dropdown. I need for it to replace

Solution 1:

If you want to replace the existing information, use .html() instead of .append(). It might be easier to just change the text of .summaryDIV:

$(document).ready(function() {
    $("#accountCoordinator1").change(function() {
        $("#summaryAccountCoordinator1 .summaryDIV").text($(this).val());
    });
});

Post a Comment for "Addeventlistener Duplicating Select Options Javascript"