November 10th, 2012, 03:03 PM
Way to select (jQuery) :after css elements
I have/want to put in some buttons for a div element using :after - i have them styled and everything, just I want them to be able to be clickable in order to do the action.
I have tried a number of ways to do this via jQuery, yet no luck - are :after/:before elements not DOM?
November 10th, 2012, 05:02 PM
Correct. Pseudo-elements are not part of the DOM. I'd recommend that you make the parent of the button large enough so that the :after and :before stay within its bounds and apply the event handler to both the button and its parent (to work with all input devices).