0

I have created an element in CSS with pseudo-class :after. Is there a way to change it's CSS properties from jQuery?

z-x
  • 411
  • 1
  • 6
  • 14

2 Answers2

1

I thinks you want

$('#object_id:after').css({
  color: blue
});
mcgrailm
  • 17,469
  • 22
  • 83
  • 129
0

Your question seems a little vague. You can change the css properties of anything in the DOM by using the css() method, like so:

$('#my-thing').css({
  fontSize: 10em,
  width: 100px
});

If you're asking about getting something with the :after pseudoclass, refer to this answered quesion

Hope this helps you!

Community
  • 1
  • 1
Groovetrain
  • 3,315
  • 19
  • 23
  • Thanks. So, it seems there is no way to manipulate the elements created in CSS using :after. – z-x Apr 01 '11 at 16:06
  • @z-x unfortunately, no it doesn't seem like this is possible at this time. But you still haven't done a good job of explaining exactly what you want to do. – Groovetrain Apr 01 '11 at 17:41