-3

So im trying to remove a banner that is automagically inserted in my email via MSOutlook. I cant seem to nail a script that pulls it out this text:

Here is the code:

<script>
  $("style='color:green'>&lt; dont want to see text. &gt;</span>).remove();
</script>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial", san-serif;
    mso-fareast-font-family:"times new roman"'><br>
    <span style='color:green'>&lt; dont want to see text. &gt;</span>
  <o:p></o:p>
  </span>
</p>
willoller
  • 7,106
  • 1
  • 35
  • 63
  • 1
    This isn't really a question yet. What kind of script are you writing? What have you tried? How do you expect it to work? – willoller Jan 04 '17 at 04:18
  • Thanks for the response. Let's say I'm not good at writing scripts yet so ill save the trouble . In short, I wanted to use the script tag in the HTML code so when the email comes through the automatically inserted banner where the text appears is gone. I tried the .removeClass in the header and the body but it doesn't work. – Confused_Question Jan 04 '17 at 04:26
  • Ah. Can you include the javascript you tried to write as well? – willoller Jan 04 '17 at 04:34
  • i tried: – Confused_Question Jan 04 '17 at 04:44

1 Answers1

0

So there are a few things going on here.

1) You probably won't have jQuery to use inside your email. The $(...) syntax is a giveaway that that's what your code relies on.

2) If you did have jQuery, selectors don't really work that way.

You'll need to write something more complex to get what you want done.

Here is another question that is trying to do something similar, and the answers don't require any extra libraries (jQuery).

How to get element by innerText

Community
  • 1
  • 1
willoller
  • 7,106
  • 1
  • 35
  • 63