0

I have a CSS

   .counter{
   span{display: none;}
   &:before{
   content: "Bookmark";
}
}



   <div class="counter fl" id="add_counter" ></div>

i want a JQuery code that change content attribute of CSS from bookmark to bookmarked

Muneeb
  • 297
  • 3
  • 13

1 Answers1

4

You can add another class that has content set to bookmarked:

$('.counter').addClass('bookmarked');

CSS:

.bookmarked{
    content: "Bookmarked";
}

Working Demo

Milind Anantwar
  • 81,290
  • 25
  • 94
  • 125