Javascript – CSS: How to remove pseudo elements (after, before,…)

csshtmljavascriptjquerypseudo-element

I would like to use a switch for the layout of paragraph tags on a webpage.

I use the after pseudoelement:

p:after {content: url("../img/paragraph.gif");}

Now I need to remove this CSS code from the page.

How can this be done easily?

I want to add that:

  • jQuery is already used on the page

  • and I do not want to include or remove files containing CSS.

Best Answer

p:after {
   content: none;
}

none is the official value to set the content, if specified, to nothing.

http://www.w3schools.com/cssref/pr_gen_content.asp