Toggle a CSS selector using JQuery
Posted
by
BEECHBOY707
on Stack Overflow
See other posts from Stack Overflow
or by BEECHBOY707
Published on 2014-08-24T10:18:16Z
Indexed on
2014/08/24
10:19 UTC
Read the original article
Hit count: 336
I am trying to toggle the display of a CSS selector (ie.to show/hide it) using JQuery. I successfully toggled the display of a div, but want to do this now with the CSS selector :after.
The CSS selector is being used to create the arrow on the box.
My attempt can be seen here: http://jsfiddle.net/beechboy707/7um9knxt/1/
Here is an extract from it showing the Jquery which is supposed to relate to the CSS selector:
$("#supportus-button-1").click(function () {
$(".supportus-button:after").toggle();
});
Many thanks for your help, Max
© Stack Overflow or respective owner