Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Select next with class

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45066
    XaviJr
    Participant

    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.

    #136162
    pixelgrid
    Participant

    $(‘.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?

    #136165
    XaviJr
    Participant

    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)
  • The forum ‘JavaScript’ is closed to new topics and replies.