Treehouse: Grow your CSS skills. Land your dream job.

:before css change with jQuery?

  • # March 30, 2012 at 1:08 pm

    So I think it would be easier to understand if you just visit the jsfiddle link, but first, my goal is to be able to change the css of “.textarea:before” using jquery .click

    # March 30, 2012 at 1:53 pm

    You can’t directly target it with jQuery because it’s technically not even a part of the DOM.

    Some people have used jQuery to add classes and then have the CSS change based on those classes.

    # March 30, 2012 at 1:56 pm

    @TheDoc – I understand, and I guess there are other ways to do this as well

    # March 30, 2012 at 2:07 pm

    This looks good, doesn’t it? –

    # March 30, 2012 at 2:31 pm

    @schart this looks better :P

    # March 30, 2012 at 4:20 pm

    @xpy – Alot better, thank’s :)

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.