system — 2011-07-08T05:40:40-04:00 — #1
How i can write code that, If in place table->td(s) the characters more than 20 character tooltip load?
for each td that the number of characters more than 20
What are your ideas?
paul_wilkins — 2011-07-08T16:43:04-04:00 — #2
Well first of all, will 20 i's be larger than 20 W's?
Second, why do you need tooltips to load? Is it due to the content being in danger of overflowing off the element? If so, that can be checked for programmatically so that the 20 character problem no longer becomes a problem.
system — 2011-07-09T02:05:44-04:00 — #3
20 is an example, the number is not specified. The 150 is more likely
I need to display values from database tooltip that their length is much
paul_wilkins — 2011-07-09T02:40:26-04:00 — #4
First you gain a reference to the element within which the text is contained.
Then you can use nodeValue or innerHTML to retrieve the content.
Based on the length of the content, you can then set a title property of the container.
system — 2011-07-09T02:56:32-04:00 — #5
paul_wilkins — 2011-07-09T08:46:44-04:00 — #6
If you take a go at it and let us know when you're having troubles, we'll help you through them.
If instead you're looking for someone to do all the work for you, there are places like the Marketplace