0

I have a h2 element in HTML and I want to manipulate the ::before pseudo element position if the H2 aligned to center. I'm looking for something like this:

$(this + '::before').css({
    'left': ($(this).width() - x) / 2
});

Is there any working solution?

netdjw
  • 4,364
  • 17
  • 68
  • 129

0 Answers0