PDA

View Full Version : Javascript -- can anyone help?


JohnnyJr
Mar-06-2007, 06:47 AM
Hi all,
I'm looking for a way to adjust this great rotating banner script (http://www.dgrin.com/showthread.php?t=53646) so it only appears on my homepage. I have different custom banners on category and gallery pages.

-- or --

If I can use the same rotating banners on homepage/category/gallery pages but only have the top 100 pixels of it showing in the categories/galleries that would work, too. I've currently set it to look this way using Ivar's code from the FAQ but it's static and does not rotate:

http://www.sissonphotography.com/
http://sisson.smugmug.com/gallery/2159911

I've been working on this for 2 days and didn't hear back on other posts. I'm sorry to be a pest. If it isn't doable can somebody please let me know? I just can't figure this one out on my own.

Thanks so much for the help and support!

richW
Mar-06-2007, 08:48 AM
After looking at this thread: http://www.dgrin.com/showthread.php?t=53646 and then viewing the page source of Ryan's hompage (http://www.sniperphotography.com/), I noticed he forgot to include the opening <div> for the code in the thread.
If you view his page source you'll see <div id="mybannerad"> above his banner code.
Just add your own <div id'="my_header2"> below this line: <!--// == ROTATING HEADER BANNER CODE== //-->
Then you can use your css:
#my_header2 {display: none;}
.homepage #my_header2 {display: block;}

JohnnyJr
Mar-06-2007, 09:36 AM
Awesome! Thanks so much! I'll give this a try.

After looking at this thread: http://www.dgrin.com/showthread.php?t=53646 and then viewing the page source of Ryan's hompage (http://www.sniperphotography.com/), I noticed he forgot to include the opening <div> for the code in the thread.
If you view his page source you'll see <div id="mybannerad"> above his banner code.
Just add your own <div id'="my_header2"> below this line: <!--// == ROTATING HEADER BANNER CODE== //-->
Then you can use your css:
#my_header2 {display: none;}
.homepage #my_header2 {display: block;}