1

removeHi how can i remove using jquery styles after my element.

I have following:

    .arrow {

        background-color: #FAFAFA;
        position: absolute;
        bottom: 60%;
        right: 60%;
        left: 20%;
        z-index: 1000;
    }
    .arrow:after {
        left: 100%;
        bottom: 0px;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
        border-width: 15px;
        border-bottom: 30px solid #FAFAFA;
        border-right: 30px solid transparent;
    }

and my question is how can i remove the styles .arrow:after using jquery and later apply it again ?

http://jsfiddle.net/765rzuy3/

vardius
  • 6,326
  • 8
  • 52
  • 97
  • 1
    You'd probably be better off changing the stylesheet so that it had a different class name before `:after` and then using JavaScript to add and remove that class name from the element. – Quentin Sep 18 '14 at 09:34
  • Question not clear @vardius. Can u descried more – Janny Sep 18 '14 at 09:35
  • Use a different class name to assign `:after` or `:before` pseudo class styles. Later you can remove those class name using using javascript. – Mr_Green Sep 18 '14 at 09:37
  • here is jssfiddle i made for you guys. http://jsfiddle.net/765rzuy3/ i just want to change the arrows you can see on the corners. only one be displayed – vardius Sep 18 '14 at 09:38
  • @Vardius check this [Fiddle](http://jsfiddle.net/765rzuy3/1/) – Mr_Green Sep 18 '14 at 09:47
  • you had nice idea, but you can still display both at the same time. here check it how i solve it. if you want you can post it as answer http://jsfiddle.net/765rzuy3/2/ – vardius Sep 18 '14 at 09:49

0 Answers0