The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Dom traversion: find "," ??

  • # February 1, 2009 at 7:39 pm

    Hi all,

    Say I have the following markup:


    and this jQuery:

    $(‘a’).click(function() {
    return false

    When you click the link it’ll fade out, so far so good. What if I want to include the following "," (comma) as well? How do I target that?


    # February 1, 2009 at 10:39 pm

    This reply has been reported for inappropriate content.

    You can’t target anything unless it has some tag of some kind around it in order to target.


    Now you can target it with $(".comma")

    # February 2, 2009 at 5:41 am

    Aha, that was what I was afraid of. I ended up using your method with $(this).next().fadeOut(); Works fine.

    Thank you! Now I’ve got a sweet ass module for clicking tags to posts ;-)

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed