JQuery Noob needs help

JQuery Noob needs help

Hi everyone,

 I'm using the following JQuery to move a CSS element from one position on the website to another.
  1. // Execute after the page was fully loaded
    setTimeout(function(){
      if (jQuery('#jsonPayload').length) {
          jQuery('ul.vp-activity-list').find('div.activity-item.request-fields.clearfix').insertBefore('.cv-request-top-panels');
             }
    }, 1);

When I refresh the page completely or load it for the first time it works fine, but when I perform an action on the page that only reloads a part of the page, the element to be moved to is duplicated.







Does anyone have any idea how I can solve the problem?

Best regards,
Stephan