Read more -button, text on the same page.

Got an idea for a tutorial ? Share it here.
Post Reply
Jaami
Posts: 38
Joined: Wed Nov 23, 2011 11:22 pm
Location: GER

Read more -button, text on the same page.

Post by Jaami »

Hello,

i am requesting with this thread, a read more -button. When you click on it, the rest text from the `preview`(posts.inc.php in the Blog Tutorial) entry shows on the same page.

I tried it already myself, but kinda failed. I managed to display the rest text of `preview` but without a button. And i wonder if that is even posible with php or do i need java for that?

So, yeah it would be cool if you could do a quick tut on that, please!
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Read more -button, text on the same page.

Post by jacek »

Would be fairly easy with javascript, impossible with php really.
Image
Jaami
Posts: 38
Joined: Wed Nov 23, 2011 11:22 pm
Location: GER

Re: Read more -button, text on the same page.

Post by Jaami »

thats what i thought..

i just found something interesting myself, which i will try later. :)
Curia
Posts: 36
Joined: Fri Aug 26, 2011 4:35 am

Re: Read more -button, text on the same page.

Post by Curia »

would have to reload the page if you used PHP so may as well make it go to the actual page.
In javascript though use something like
http://henrik.nyh.se/examples/truncator ... uncator.js

or
http://coxmediagroup.github.com/jquery-textconstrain/
Post Reply