Jump to content
xisto Community
Sign in to follow this  
BuffaloHelp

Request Script: Short Or Full View Without Sql partial hidden content until clicked to view more

Recommended Posts

I'd like to request the following "behavior" in PHP if at all possible.

I have a content that shows

Mary had a little lamb and it was white as snow.Click here to see more(link)

And when the "link" is clicked I would like to see the full view.

Mary had a little lamb and it was white as snow.
The quick brown fox jummped over the lazy dog.
Click here to see less(link)

This time the "link" will shrink and show only the short view.

I made style.css class HIDDEN where <div class="hidden"> in the page does not show, but still part of a file. The reason for this is that I'm hoping I don't have to make multiple files to show more or less.

The objective for my request for PHP script is to have one single file with PHP code that can show or hide a content that is triggered by clicking a link, i.e. index.php?view=hide or unhide.

I would appreciate any suggestions without using SQL database. Essentially, I'd like to mimic CuteNews short or full view.

Share this post


Link to post
Share on other sites

An approach which might work is found here. Use tooltips as a hidden span to conceal the full text, then on mouseover, have the full text displayed as a tooltip. When a mouseout occurs, the text hides itself. Might work??? No page refresh is required, either.

Mary had a litle Lamb, its fleece was white as snow,And everywhere that Mary went, the Lamb was sure to go.

Get the quote right.


Alternately, read the first line of a file for initial display, onclick, read additional information from the file and display. Reverse the process to shrink the displayed info. As Tyssen points out, though, the page refresh would need to occur each time the click happens.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.