How does jQueryMobile shows "..." when there's not enough space to view all the text?
Is it an CSS attribute?
How does jQueryMobile shows "..." when there's not enough space to view all the text?
Is it an CSS attribute?
There is a CSS attribute for this -- it is text-overflow:ellipsis;
.
However, there is one problem with it: it doesn't work in Firefox. It works in all other browsers, but not Firefox, not even FF4. I understand it's planned for FF5 or FF6.
In Firefox, it would need to be done using pure Javascript, which is where the JQuery would need to do some work. To do it accurately, it would need to calculate the physical size of the text in pixels, character by character. It is possible that it does use the CSS property in other browsers. It would make sense.
See this post: text-overflow:ellipsis in Firefox 4? (and FF5) for a further discussion of this issue specific to Firefox.