title: jQuery - Replace Text(Slogan) with HTML(Logo)
body: <p>i want to replace a specific Slogan(Text) with an Image(HTML) via jQuery on every Page, except the Slogan in the E-Mail-address.</p>
  
  <p>First i tried this, but the problem was it was outputing text and not HTML</p>
  
  <pre><code>jQuery("p").text(function () {
      return jQuery(this).text().replace("Slogan", '&lt;img src="/wp-content/uploads/Slogan-logo.svg" alt="Slogan"&gt;'); 
  });
  </code></pre>
  
  <p>Second i tried this following code, but it also replaced <code>alt="Slogan"</code> of existing elements and broke the site:</p>
  
  <pre><code>jQuery(function($){
  $("p").html(function(i,o) {
     return o.replace('Slogan','&lt;img class="script-logo" src="/wp-content/uploads/logo.svg" alt="Slogan"&gt;');
   })
  });
  </code></pre>
  
  <p>Now i use this code, but it is not really save to use when a other person fills the content, and im afraid that it will not work as wanted.</p>
  
  <pre><code>jQuery(function($){
  
   $('p:contains("Slogan")').html(function(i,o) {
     return o.replace('Slogan','&lt;img class="script-logo" src="/wp-content/uploads/Slogan-logo.svg" alt="Slogan"&gt;');
   })
  });
  </code></pre>
  
  <p>Is there any proper and save way to archive what i want to do?</p>
  
  <p>fyi: i dont select only the Paragraph like in the example, i also select all Headlines and ankertags.</p>
  
  <p>Had some troubles with the requested HTML example, hopefully this helps and is enough:</p>
  
  <pre><code>&lt;!--- Nav example ---&gt;
  
  &lt;div class="wpb_raw_code wpb_content_element wpb_raw_html"&gt;
          &lt;div class="wpb_wrapper"&gt;
              &lt;div class="vc_btn3-container menuButton vc_btn3-inline"&gt;
  &lt;a class="scroll vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-square vc_btn3-style-flat vc_btn3-color-default" href="/live/" title="" data-hover="/wp-content/uploads/menu-Slogan-video3.jpg"&gt;Slogan 0-5A Bearbeitung&lt;/a&gt;
  &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;!---  Content Example ---&gt;
  &lt;div class="wpb_raw_code wpb_content_element wpb_raw_html"&gt;
          &lt;div class="wpb_wrapper"&gt;
              &lt;div class="vc_btn3-container menuButton vc_btn3-inline"&gt;
  &lt;a class="scroll vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-square vc_btn3-style-flat vc_btn3-color-default" href="/live-zerspanung/" title="" data-hover="/wp-content/uploads/menu-Slogan-video3.jpg"&gt;Slogan UE110-5A Simultan Bearbeitung&lt;/a&gt;
  &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;!--- Footer Example ---&gt;
  
  &lt;div class="column one-fourth"&gt;&lt;aside id="text-2" class="widget widget_text"&gt;           &lt;div class="textwidget"&gt;&lt;div class="image_frame image_item no_link scale-with-grid alignnone no_border"&gt;&lt;div class="image_wrapper"&gt;&lt;img class="scale-with-grid" src="http://www1.Slogan.at.5.your-server.de/wp-content/uploads/Slogan-logo.svg" alt="Slogan-logo"&gt;&lt;/div&gt;&lt;/div&gt;
  
  &lt;hr class="no_line" style="margin: 0 auto 20px;"&gt;
  
  &lt;h5&gt;Unternehmen der Slogan GmbH&lt;/h5&gt;
  &lt;p class="big&amp;quot;" style="margin: 0px 0px 5px 0px;"&gt;&lt;/p&gt;
  &lt;p class="big&amp;quot;" style="margin: 0px 0px 5px 0px;"&gt;E-Mail: &lt;a href="mailto:holding@Slogan.eu"&gt;holding@Slogan.eu&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
          &lt;/aside&gt;&lt;/div&gt;
  
  
  &lt;div class="copyright"&gt;
          &lt;p&gt;© 2016 &lt;img class="script-logo-Slogan" src="/wp-content/uploads/Slogan-logo-white.svg" alt="Slogan"&gt; Slogan Gmbh - Lorem | &lt;a href="/impressum"&gt;Impressum&lt;/a&gt; | &lt;a href="/datenschutz"&gt;Datenschutz&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;  
  </code></pre>