Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

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>
0
jcbmtt
Asked:
jcbmtt
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
That is only one line.  <br> or <br /> are line breaks in HTML.
0
 
Gurvinder Pal SinghCommented:
You can divide the height of the div with the height of one sentence to get number of lines
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now