Solved

count number of lines

Posted on 2012-03-23
5
251 Views
Last Modified: 2012-04-03
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
Comment
Question by:jcbmtt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37756054
That is only one line.  <br> or <br /> are line breaks in HTML.
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 37756058
You can divide the height of the div with the height of one sentence to get number of lines
0
 

Author Comment

by:jcbmtt
ID: 37756069
friends, <br>s are hidden.  what function will help me achieve this?
0
 
LVL 7

Expert Comment

by:cstsang
ID: 37765066
Is it possible to count it in server side?
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37775253
did you tried what i suggested?
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question