0
   

Show part of my home page -hide the other paart behind a link

 
 
Reply Mon 16 Mar, 2009 08:07 am
My home page is too long, I am trying to show some of it when I open my website then if I need more I can click on a link to open the rest of the page.
I am looking for HTML code, but I need a link to show the rest of the page and not to open a new page.

Thanks
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,562 • Replies: 1
No top replies

 
View best answer, chosen by ammaryameen
Robert Gentel
  Selected Answer
 
  2  
Reply Mon 16 Mar, 2009 01:04 pm
@ammaryameen,
There are many different ways you can do this. You can use ajax to fetch content, or you can just use javascript to modify the css of a hidden element. Here's a simple example with a hidden element and a link that will show it.

Code:<a onclick="document.getElementById('elementId').style.display = '';" style="cursor:pointer;">show</a>
<div id="elementId" style="display:none;">
hidden content
</div>


If you need it to toggle (show and hide) then you can set it back to "display:none".

You may also find javascript libraries like YUI, jquery, and mootools useful for this kind of thing if you end up doing more of it on your site.
0 Replies
 
 

Related Topics

In How much time a website can be developed? - Question by aussiejumpingcastle
Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Show part of my home page -hide the other paart behind a link
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 09/18/2019 at 07:17:59