1

I need to replace the "content" inside the div for run an A/B test.

Now I have this HTML:

<p class="flag off-10- product">

In the CSS I have ::before and ::after:

::before

content:' ';

::after

content:'XXXX% OFF'

And the jQuery:

$('.flag off-10- product').attr('content','New XXXX off%');
Touheed Khan
  • 2,149
  • 16
  • 26
StackPalta
  • 21
  • 5
  • 1
    https://stackoverflow.com/questions/17788990/access-the-css-after-selector-with-jquery this wil help you out. – C.Schubert Feb 17 '18 at 16:29
  • 1
    Try this below. https://stackoverflow.com/questions/5041494/selecting-and-manipulating-css-pseudo-elements-such-as-before-and-after-usin – Mr Nsubuga Feb 17 '18 at 16:45

0 Answers0