<div id="collapse"> <div class="cotainer"> <div id="fsContent"> <input type="text" id="fsContent odd"/> </div> <div id="fsContent"> <input type="text" id="fsContent odd" value="Cursor is Here Now"/> </div> <!-- Similar fsContent blocks below --> <div id="fsContent"> </div>
</div> <div class="cotainer"> <div id="fsContent"> </div> <div id="fsContent"> </div> </div> <!-- Similar container blocks --> <div class="cotainer"></div> <div class="cotainer"></div> <div class="cotainer"></div> </div> <div id="collapse"> <div class="cotainer">Similar block as first</div> </div> <div id="collapse"></div> <div id="collapse"></div> On the html code above, User cursor is in textBox with value="Cursor is Here Now". I want to select all 'fsContent' blocks which are next to current cursor. Current cursor gives object to user. I tried.. eg. var sel=var nextRow = obj.parent().parent().nextAll(".fsItem:has (input))"); But this gives 'fsContent' blocks in only current container. I wanted to access all blocks which are in whole page, but after cursor. Please, let me have selector using object of current input text