Show/Hide Text on Top of Content

sdee / 2011-02-13 05:54:23   

Hi Guys

Basically what I would like to know is; is it possible to have the text showing on top of content/image on click (example site: http://www.123buero.com/projects/galerie-fuer-moderne-fotografie/?image=1)?

on that site, when you click on a project and then click on about project, the text appears on top of whatever the content is displaying. if you move on to next project, a different set of text will appear, relevant to that project.

my website is www.suryaprasetya.com.au - it would be very useful to have this function instead of having an info section within the slideshow which what i have at the moment.

any help would be much appreciated.

thanks guys!

G470 / 2011-02-13 07:10:11   

Hi,
that´s a bit css plus javascript ;) no big thing. Give your text a absolute position and set it to display hidden. Next step is to add a toggle button to your horizontal exhibit file. This can be a simple link or just a div. (important is only to give a id. Something like this:

<div id="mytogglebutton">Show me text</div>

ok. next step is to add the needed jquery code in your header (index.php )

  1. <script type="text/javascript"> 
  2. $("#mytogglebutton").click(function () {
  3.     $("#yourtext").show("slow");
  4.     });</script>
sdee / 2011-02-14 05:19:36   

Hi mate

thanks for the reply. however I cant get it to work. I don't think I have a class for text in my css. Im not that great with coding as well unfortunately.

I'll link my css files

http://suryaprasetya.com.au/ndxz-studio/site/sample/style.css

thanks a lot

sdee / 2011-02-15 06:30:08   

Hey G470, think I got part of it to work. didnt manage the java script part though to make the 'slow' to work though.

Thanks for you help and response! :)

This thread has been closed, thank you.