Solved

count number of lines

Posted on 2012-03-23
5
247 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

786 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