How am I able to do thissss? |
How am I able to do thissss? |
Apr 25 2010, 09:56 AM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 164 Joined: May 2008 Member No: 647,219 |
Okay, So I realized I have a lot of content on my website.
So I asked a suggestion, and They told me to have it hidden, and pretty much people click on it to Bring the rest up, instead of going to a new page to get it all, it can just appear, and disappear by View more, or Hide the rest, etc. http://ego-box.com/ - Their Content bar, the View more, How do you do that? |
|
|
|
![]() |
Apr 25 2010, 10:54 AM
Post
#2
|
|
![]() Member ![]() ![]() Group: Member Posts: 28 Joined: May 2009 Member No: 728,558 |
CODE <script language=javascript type='text/javascript'> function hidediv(pass) { var divs = document.getElementsByTagName('div'); for(i=0;i<divs.length;i++){ if(divs[i].id.match(pass)){//if they are 'see' divs if (document.getElementById) // DOM3 = IE5, NS6 divs[i].style.visibility="hidden";// show/hide else if (document.layers) // Netscape 4 document.layers[divs[i]].display = 'hidden'; else // IE 4 document.all.hideshow.divs[i].visibility = 'hidden'; } } } function showdiv(pass) { var divs = document.getElementsByTagName('div'); for(i=0;i<divs.length;i++){ if(divs[i].id.match(pass)){ if (document.getElementById) divs[i].style.visibility="visible"; else if (document.layers) // Netscape 4 document.layers[divs[i]].display = 'visible'; else // IE 4 document.all.hideshow.divs[i].visibility = 'visible'; } } } </script> Put that script in your header and for the content you want to hide put them in a div -ex. CODE <div id="whatever you name it"> Stuff you want to hide/show here </div> - the link that hides the content is: CODE <a href="java script:hidediv('whatever you name it')">hide this div</a> the link that shows the content is: CODE <a href="java script:showdiv('whatever you name it')">show this div</a> I hope this helps you!:] SOURCE
Reason for edit: Please use [codebox] and [code] tags respectively when posting codes. - Mike
|
|
|
|
Gippersnap How am I able to do thissss? Apr 25 2010, 09:56 AM
Gippersnap Am I able to get ALITTLE bit more detail on where ... Apr 25 2010, 02:42 PM
999Murderdoll666 If im understanding correctly,you want to use the ... Apr 25 2010, 07:30 PM
Gippersnap I have them Seperated Left and right, instead of C... Apr 25 2010, 08:05 PM
Uso I would contact mike, He prolly knows what to do Apr 25 2010, 09:29 PM
Gippersnap I didddd, but no response :( Apr 26 2010, 03:16 PM
Mikeplyts I'd probably use jQuery for this. It makes the... Apr 26 2010, 03:50 PM
fixtatik If you want to go the jQuery route, might I make a... Apr 26 2010, 05:24 PM
Gippersnap I went to the Website link you gave me, and it bro... Apr 26 2010, 06:56 PM
Mikeplyts Try clicking it again.
Or, click this. Apr 26 2010, 07:05 PM
fixtatik Google has jQuery hosted on its developer API. Usi... Apr 26 2010, 07:17 PM
Mike Try this? Or choose from other methods here. Apr 27 2010, 05:35 PM![]() ![]() |