-1

I want to basically do this. But it doesn't work.

$('.child_flyout:after').css({'top':'20px'});

Any workaround to do this in jQuery?

Hushme
  • 3,108
  • 1
  • 20
  • 26
aBhijit
  • 5,261
  • 10
  • 36
  • 56
  • 1
    sorry bro :after element does not exist is dom so you cant achieve this i asked the similar question today – Hushme Jul 29 '13 at 11:33
  • Some duplicates are good. Marking duplicate for such questions is unfair. It's just another way to ask the same question. What if users didn't know that they are called psudo elements. – aBhijit Jul 29 '13 at 11:43
  • 2
    Marking topis as duplicate is not to punish poster, this is merely to help future researchers to spot the right topic instead of having to search between hundred duplicate topics. I don't see what is wrong with that. – A. Wolff Jul 29 '13 at 11:51

1 Answers1

4

Maybe It's just me, but I usually define the psuedo element in css and add the class.

.poptop:after {
    top:20px;   
}


$('.child_flyout').addClass('poptop');
Dan Martin
  • 56
  • 3