What is the plus (+) in the jquery selector

I see this selector

$( 'a + .firstSection a' ).live( 'click', function(){ 

in my js file. What is the purpose of the + sign here?

+8
jquery jquery-selectors
source share
2 answers

From the jquery doc:

Selects all the following items matching "next", which are immediately preceded by the brother "prev". A selector corresponding to the element next to the first selector.

Read more about prev + next selector

+12
source share
  • Overview of jQuery Docs on Selectors
  • Find Next Neighbor Selector ("prev + next")
  • Read it

    Selects all the following elements matching "next" that immediately preceded the brother "prev".

    Note: even if you do not understand this (and an example!), Now you have keywords to search!

  • Next time, do not ask questions that can be answered simply by reading the official guide.

+1
source share

All Articles