A UI built using HTML and CSS has limited screen space. One of the elements is a div tag (<div id=“mtext”>) that will contain text of variable length. If the text is > 500 characters, I am displaying it as a link. When the user clicks the link, I want the text to be displayed in a layer above all the rest of the elements in the page. How can this be done using javascript…
//---------------------------------------
// PSEUDO-CODE
//---------------------------------------
A div element that contains some text of variable length.
If the length exceeds say 500 characters,
Display it as truncated text. ( like "Example text...")
The entire truncated text becomes a link
When the user clicks the link
the content in the div element "pops out" to fill the screen above other elements on the page
Image showing truncated text… (before clicking)
Image showing text display after clicking the text…