I have html codes like
<div id="content">
   <span class="pivot">1</span>
   I know this is a really simple
   <span class="pivot">2</span>
   question
   <span class="pivot">3</span>
   to answer 
   <span class="pivot">4</span>
   please 
   <span class="pivot">5</span>
   help me to solve.
</div>
I select the text and I want to get the start_index (this case = 0) and last_index (this case = 39) of this text in the whole text without span of class pivot
Fiddle: http://jsfiddle.net/a7bxp/1/
 
     
     
     
    
Or will you always select the first sentence? – Alan Piralla Dec 04 '13 at 14:28