Grow your CSS skills. Land your dream job.

Select next with class

  • # May 23, 2013 at 5:39 am

    http://jsfiddle.net/Bm7mN/

    I want to select “.slide-content”. I tried next(), nextAll() and now closest(). Isn’t possible?

    PS: I know I shouldn’t have that extra div but I need that for other script.

    # May 23, 2013 at 5:58 am

    $(‘.slide-title’).click(function() {
    console.log($(this).next().find(‘.slide-content’).text().length);
    });

    im sure there is an easier way to go but what do you want to do with it?

    # May 23, 2013 at 6:21 am

    That’s perfect, thank you.

    I was just using length to have sure that I was selecting .slide-content, I don’t need the content size.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".