Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have below class in CSS.

CSS
.ezt-box {
    padding: 10px;
    background-color: rgb(142, 51, 51);
    color: white;
    font-family: lato;
}

.ezt-box:after {
    cursor: pointer;
    float: right;
}


I know how to get css from "ezt-box" using jQuery.

I want to know how to get css from "ezt-box:after" using jQuery.
Posted
Updated 29-Jul-15 21:05pm
v2

1 solution

You can't. (As far I know)

1. :after or ::after is a pseudo element which allows you to insert content after a selector through CSS. It's not a selector.

2. As :after is used to insert content but you haven't added any content so it will have no effect on your page.
CSS
.ezt-box:after {
    cursor: pointer;
    float: right;
}

Try adding content and see the change after page renders to browser.
CSS
.ezt-box:after {
    content:"----some random text";
    cursor: pointer;
    float: right;
}


Check this tutorial in w3Schools.com[^]

Hope, it helps :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900