|
#1
Apr 29, 2010, 07:33 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
[This comes from a tip by johanl from post http://forum.bytesforall.com/showthread.php?t=4046] - nice find it looks very nice!
If you would like to have a cross-fade (gentle fade in/out) the multiple header images instead of the harsh image rotation, edit js.php and change line 61 (in version 3.4.4-3.4.6) from
HTML Code:
window.onload = RotateHeaderImages;
to
HTML Code:
// Smooth fading code starts here
var fadeInSpeed=2500; // ms
var fadeOutSpeed=2000; // ms
function PrepareRotatingImages() {
if (document.body){
if(HeaderImages.length < 2)
return;
imageContainer = jQuery('#imagecontainer');
imageContainer.css("background","none");
for(i=0; i < HeaderImages.length; i++) {
imageContainer.append("<div id=\"himage" + i + "\" style=\"overflow:hidden;display:none;position:absolute;top=0;left=0;width:100%;height:<?php echo $bfa_ata["headerimage_height"]?>px\"><img src=\""+HeaderImages[i]+"\"/></div>");
}
jQuery("#himage"+j).fadeIn(fadeInSpeed);
SmoothRotateHeaderImages();
}
}
function SmoothRotateHeaderImages() {
fadeOutImage=jQuery("#himage"+j);
j+=1; if(j>(HeaderImages.length-1)) j=0;
fadeInImage=jQuery("#himage"+j);
fadeInImage.fadeIn(fadeInSpeed);
fadeOutImage.fadeOut(fadeOutSpeed);
t = setTimeout('SmoothRotateHeaderImages()', <?php echo $bfa_ata['header_image_javascript']; ?>000);
}
window.onload = PrepareRotatingImages;
// end smooth fading
Make sure you have set ATO->Header Image->Rotate header images with Javascript? to a number greater than '0' or this will not work.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Oct 12, 2010 at 05:28 PM.
|
#2
May 11, 2010, 08:41 AM
|
|
|
|
48 posts · May 2010
Lexington, KY USA
|
|
Awesome!
You're right... it does look FANTASTIC.
|
#3
May 14, 2010, 04:54 PM
|
|
Thank you, Juggledad!!
|
#4
May 17, 2010, 11:05 AM
|
|
|
|
24 posts · Dec 2009
Colombia
|
|
hi, thanks for this, got a question.. does this works with version 3.4.9??
it only mentions 3.4.4 - 3.4.6, so i wonder..
thanks.
|
#5
May 17, 2010, 11:29 AM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Just tested and it works fine.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#6
May 17, 2010, 11:41 AM
|
|
|
|
24 posts · Dec 2009
Colombia
|
|
Well, yes, just tested it and it works but i found a problem.
In my case i have the header images align at "top center". After changing the code to add the fade in/out the alignment changed.
After the first load of the page the header image it's aligned top center but when it does the first fade out and then the fade in to the next img the alignment is lost. I really like this feature so i would like to keep it, so my question is, how can i fix this so the alignment does get lost.
Thanks.
|
#7
May 17, 2010, 12:23 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
Mine are set to align top center as well. What is the URL for your site?
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#9
May 17, 2010, 01:08 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
It isn't the centering it is the image sizes. If you set your Layout Width in ATO>Style & configure LAYOUT to no more than 1220px and your height in to no more than 180px in ATO>Header Image you should be fine.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#10
May 17, 2010, 01:42 PM
|
|
|
|
24 posts · Dec 2009
Colombia
|
|
i can't change the layout, and the header images are set to fix the size of the layout when they are top centered. Check the site again, i turn it back to not fade in/out the headers, you'll see all of them centered as they should be (as i put them).
btw, the fade in/out doesn't make the header image clickeable..
|
#11
May 17, 2010, 02:47 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
I see what you mean. Could you try something? What happens if you use other alignment choices like "Top Left", "Center Center" etc?
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#12
May 17, 2010, 04:13 PM
|
|
|
|
24 posts · Dec 2009
Colombia
|
|
I've just tryed that, did not work.. for what i see it keeps aligning the image to top-left.
Seems that in order to keep the images fading i have to edit the images. I'ts a shame i can't use the top-center alignment.
|
#13
May 19, 2010, 10:09 PM
|
|
|
9 posts · Mar 2010
Austin, TX
|
|
Sorry I can't help. I really liked your tags animation. How did you get that functionality?
|
#14
May 22, 2010, 11:46 AM
|
|
|
|
24 posts · Dec 2009
Colombia
|
|
Hi, don't worry about the headers, i changed it back to fixed ones.
The Tags animation I did it through a plugin call "WP-Cumulus" ( http://wordpress.org/extend/plugins/wp-cumulus/)
|
#15
May 27, 2010, 01:26 PM
|
|
Seems to not work in IE, unfortunately.
|
#16
May 27, 2010, 01:30 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
The new Fading Header in Atahualpa 3.5.0 and 3.5.1 works in Firefox, IE8, Opera, Safari, and Chrome
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#17
May 27, 2010, 03:00 PM
|
|
Hmm. It doesn't seem to be working in mine. I installed 3.5.1.
It does work in Chrome/FF.
Here's the site:
http://issfleetteam.com/
|
#18
May 27, 2010, 03:02 PM
|
|
Also, since I updated my site slogan seems to be getting hidden in Firefox/Chrome, but is visible in IE.
|
#19
May 27, 2010, 03:31 PM
|
|
|
|
10,176 posts · Jul 2009
Central New York State USA
|
|
It's working fine for me in all browsers.
__________________
~Larry ( CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
|
#20
May 27, 2010, 03:48 PM
|
|
Odd. I just checked on another pc and it's working fine there too. *shrug*
|
#21
Jun 3, 2010, 02:36 PM
|
|
|
15 posts · Dec 2009
Hudson, Florida
|
|
Quote:
Originally Posted by lmilesw
I see what you mean. Could you try something? What happens if you use other alignment choices like "Top Left", "Center Center" etc?
|
I'm having the same issue, I believe...upgraded to 3.5.1 and using WP 2.9.2. When I use Top Center or any other choice for that matter, the images, upon refresh of the page, come out centered but then the next image is all the way to the left and a little piece of the original image is still visible on the right side...what can I do to fix it?? I did take out all images that were not 1300x150 - should I switch to 1220??
Any help would be appreciated? Also, I do not see the tabs with sliding menus....
|
#22
Jun 3, 2010, 02:44 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Are you using the code in this post or the new fading java option.
The new java fading option seems to have some issues (it's not this same code) and when the java code overlays the image it ignore the position, opacity and blog title overlay'.
For the time being if you want to have fading images, I suggest doing it the way this thread says and not use teh new theme option.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#23
Jun 3, 2010, 02:57 PM
|
|
|
15 posts · Dec 2009
Hudson, Florida
|
|
Well, I used the code from above and still no joy....
|
#24
Jun 3, 2010, 03:10 PM
|
|
|
15 posts · Dec 2009
Hudson, Florida
|
|
OK, now it works! I changed the first 3 settings to 5, 5, and Yes, respectively, and with Mafgirl's suggestion, changed the width of my site to 1300 and now they fade to different images!! No opaqueness but, hell, it works!
Now, to figure out the category/sliding menu thingy....
|
#25
Jul 7, 2010, 09:43 AM
|
|
Hello,
Does anybody has problems running this code on Chrome?
It worked on FF and IE, but the header image remains static on chrome. Only the initial fading happens.
|
|