.siblings() method allows us to search through the siblings of the elements on which jquery logic is performed. Use this editor:- http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_siblings And run this code:- siblings demo list item 1 list item 2 list item 3 list item 4 list item 5 list item 1,list item 2,list item4,list item 5 will highlight. These are none other than siblings of list item3. In the same way you can change the above written jquery to:- "$( "li" ).siblings('.third-item').css( "background-color", "red" );" Theis will highlight the list item 3 because it is now searching the sibling of li whose class is '.third-tem'.