count number of lines

if i want to populate the number lines in a div, how do i do it using jquery and populate it in the span tag. pl advice.


<span id="count"> 10</span>
<div id="lines">
hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello worldhello world hello world hello world hello world hello world hello world hello world
</div>
jcbmttAsked:
Who is Participating?
 
Gurvinder Pal SinghConnect With a Mentor Commented:
You can divide the height of the div with the height of one sentence to get number of lines
0
 
Dave BaldwinFixer of ProblemsCommented:
That is only one line.  <br> or <br /> are line breaks in HTML.
0
 
jcbmttAuthor Commented:
friends, <br>s are hidden.  what function will help me achieve this?
0
 
cstsangCommented:
Is it possible to count it in server side?
0
 
Gurvinder Pal SinghCommented:
did you tried what i suggested?
0
All Courses

From novice to tech pro — start learning today.