3 Replies Latest reply on Oct 16, 2016 11:50 PM by ParitMittal

    jquery code never executes

    gajanr19756109

      Hi,

      Trying to execute below code in custom code of an activity.

      https://diceholdings.marketing.adobe.com/content/mac/diceholdings/target/activities.html#a ctivitydetails/A-B/untitled_activity29sep20161901170530

      Can anyone please help me in getting to what I am missing here.

      <script type="text/javascript">
      jQuery(document).ready(function(){

          alert("DOM is ready");
          
          // wait until window is loaded (images, links etc...)
          window.onload = function() {
              
              alert("window is loaded");
            
            jQuery('.price-wrap').each({
              var storePrice = jQuery(this).children('strong');
              jQuery(this).children('strong').remove();
              var getPriceWrap = jQuery(this).text();
              getPriceWrap.replace('total','');
              jQuery(this).html(getPriceWrap);
              jQuery(this).prepend(storePrice);
            });
        });
      </script>