I am using CSS Trick's anything slider on a wordpress blog, and it works great! However, I would like to change the animation from a slide to a fadein/out. I know the script is powerful because of how it is able to arrange the elements and slide through them, but based on the context in which I am using it, I need it to fade. I would search for a simple fadein/out gallery, but the anything slider has many other benefits, the counting posts with mini links, the start/stop and stop on hover, etc..., I do not want to delete it entirely, I am just looking to change the animation. I know some jquery, but looking at the script file, it is far too complex for what I know. Any/all help is much appreciated!
Here is a link to the example page for anything slider. http://css-tricks.com/examples/AnythingSlider/
The problem is the fader will be much simpler, and currently this is just a quick hack to get it done. For example, it still lines all the slides up in a row and clones the first and last and all that, which will not be necessary in the final version.
Hey Chris, Sorry for the delayed reply, apparently I got the flu the day after I wrote that post and I am just getting back in the loop. Anything Fade was EXACTLY what I was looking for! Can't thank you enough for your help.
HI - Love the fader - definitely more what I was looking for :) A little less jarring than the sliding :)
Question ... I altered the css a bit to have some smaller back and forward buttons -- butnow they aren't working. They display ... but they don't function (and the hover doesn't work either). They're 4 buttons in a sprite -- individual buttons are 15px by 21 px.
Looking forward to seeing your final version of AnythingFader :-)
However it would be great if the slides faded from one to the other without a fade to white in between - as does the Jquery Fader Plugin by Philip Floetotto http://philipf.alphacomplex.org/plugins/fader/demo.html (that one unlike yours doesn't have a pause while hovering function or a start/stop button both of which are extremely useful - plus isn't being developed any more).
Basically, all you have to do is remove the absolute positioning CSS rule that Chris added to: #.anythingFader .wrapper ul { width: 9999px; list-style: none; position: absolute; top: 0; left: 0; background: #eee; border-top: 3px solid #e0a213; border-bottom: 3px solid #e0a213; margin: 0; }
Yea, seems to have worked fine now. Double check that you dont have any previously nested styles that may be positioning an ul or li element relative /absolute.
For instance i had previously used something like:
#rightcol ul { position: relative} #rightcol ul li { position: relative}
So if you are still not seeing the animation make sure u havn't got styles like that forcing the child ul lis to position themselves relative!
I'm using this current version of the AnythingFader on a Wordpress site and for some reason it gets stuck on the second frame. Even when clicking the navigation to jump to another slide it'll load for a second then go right back to the second frame. Here is the page: http://identitypr.com/14962-tri-land-cherokee-south/
Chris, I just wanted to give you a huge pat on the back for all the fantastic work you have done with AnythingSlider and now the fader version. I've used the slider on a couple of projects now, and it is a dream to work with. I have just used your prototype fader version to update one of those installations (at the clients request) and even though it is not the final version, it so far appears to work just great.
Thanks so much, and please continue to develop this and other useful tools. -Nathan
Can anyone help me with controlling AnythingFader externally? I want to put some interactive content within my slides but I want anythingfader to stop playing on user interaction.
I notice that when you click on "Stop" and changes to "Go" button background should change to red, but it remains green, I'm adapting this new anythingfade to my proyect and normally I erase the start-stop texts and change for backgrounds images (play and pause shapes) but when I preview it the pause button appears and work, but never change to play.
Hope there's a way to fix it. Thank you so much Chris for this Plug-in, in my opinion is one of the best sliding plugins.
I just updated AnythingSlider to version 1.5.8. If you use the updated FX extension, you can fade between the slides. Here is the code needed to make this work:
$('#slider1') .anythingSlider({ animationTime : 0 // zero time between slide transitions }) .anythingSliderFx({ '.panel' : [ 'fade', 1000, 'easeOutCirc' ] // target the entire panel and fade will take 1000ms });
The only problem is that the opacity of each panel starts at 1, so a little bit of extra css is needed:
<style type="text/css"> #slider1 .panel { opacity: 0; } #slider1 .panel.activePage { opacity: 1; } /* make sure active panel is visible */ </style>
Hello, I would like to change the stop/start button to a Play/Pause image. Seems to be something that would have to be set in the CSS, any idea how to accomplish this? Thank you.
Mottie, I believe I've implemented the changes you mentioned above correctly...but the slider now shows the slide moving to the left as it is fading out. The new slide fades in perfectly though. Does anyone have any ideas?
Solved...I had the animationtime still set in the other javascript file under the default settings. I changed that to 0 and took the champaign out of the cooler.
Not only is that killer, but you did it so quickly! Thank you so much. I recommend keeping something similar in the demo stuff for the next release. I have searched for other options, but nothing comes really close to what AnythingSlider has to offer. Nivo is nice, but no full HTML support...
Any reason that I wouldn't be able to use bg images on the slides?
What I'm trying to pull off is have a somewhat transparent png overlay on top of another image. I am currently trying to achieve this by putting the png in the and using css to put the other image as a bg image. But it will not show the bg image.
You should be able to use any background you want on the slides. I made a demo for you using two methods: the first is how I would do it and the second is the method you described above - it is commented out. Both work, so I'll leave it up to you.
The demo shows the first method by default. I prefer this method since you said the user can define the slider images - background images are only resizable in css3. What this method does is appends an overlay div to each panel. You could also add the text you mentioned inside this div. The div's css adds the overlay image and positions it over the panel image to get the effect you desire.
The second method replaces the img src with the overlay image, then moves the original img src into the panel background. Like I said I don't think this is the best method because of the chance the img isn't the same size as the slider and the user is using a non-css3 browser.
I have used the Anythingfader slider on a site but I have one error that I can't fix. When you select the second group of images the last slide is displayed first.
I'm working with the anything fader vs. anything slider. These are f'in awesome works! No other slider out there even compares. I've been experimenting with all of them and seriously? Nice work!
Here's my dilemma? Somewhere in the code my list image rule is getting broken. I believe? What I'm doing is basically creating three columns inside of each slide. Each one of these columns has a list inside of it. The list type image should have a particular image as declared in the (index) style sheet.
When I use the anything slider everything works perfectly, but using the same implementation with the fader the list type images do not show. I assume this rule is being broken somewhere? I know I am calling upon the list correctly because of the border around the list, as you can see in the link I will provide.
<li>Understanding of design principles</li> <li>Meticulous attention to detail</li> <li>Knowledge of grid systems</li> <li>Project management</li> <li>Able to manage multiple projects</li> <li>Self-Starter & responsible</li> <li>Customer service skills bar none</li>
</div><!--end of text slide--> </li><!--END OF FIRST SLIDE-->
<li><!--START OF SECOND SLIDE-->
<div id="textSlide"><!--start of text slide-->
<div id="col_c2">
<p><span class="style-2">My Stats...</span></p>
<ul>
<li><strong>Name:</strong> James Knoll (Jimmy)</li> <li><strong>Birth Date:</strong> 23rd Janury 1972</li> <li><strong>Background:</strong> Caucasian</li> <li><strong>City:</strong> St. Louis</li> <li><strong>Country:</strong> U.S.A.</li> <li><strong>Occupation:</strong> Web Designer</li> <li><strong>Education:</strong> The Art Insitute</li>
</ul>
</div><!--end of col_c-->
<div id="col_d2">
<p><span class="style-2">My Likes...</span></p>
<ul class="no">
<li><strong>Movies:</strong> Horror & Drama</li> <li><strong>Music:</strong> Heavy Metal & Rock</li> <li><strong>Food:</strong> Chineese & Italian</li> <li><strong>Hobbies:</strong> Fishing, Cooking & Art</li>
</ul>
</div><!--end of col_d-->
<div id="col_e2">
</div><!--end of col_e-->
</div><!--end of text slide--> </li><!--END OF SECOND SLIDE--> </ul> </div><!-- end of wrapper--> </div><!-- end of anything fader-->
MY index CSS-----------------------------------------------------
Hey @chriscoyier, any chance of letting us browse the contents of that examples folder? I have no doubt there's some other cool stuff hidden away in there.
One other thought, any chance of an AnythingGallery that does a random transition/animation?
I just started using Anything Slider with fx extension. I want my images to fade out/in. I got them to fade in, but when they should fade out they just disappear, no fading effect there. Any ideas on what I might be doing wrong?
Code looks like this:
$(function () {
$('#slider1') .anythingSlider({ autoPlay: true, width: 730, height: 490, buildArrows: true, delay: 5000, animationTime : 0, // zero time between slide transitions })
.anythingSliderFx({ // target the entire panel and fade will take 500ms '.panel' : [ 'fade', 1000, 'easeInOutCirc' ] }); })
@Jimmy: Sorry I didn't respond earlier... I saw you were using AnythingFader which isn't really being maintained since AnythingSlider does the same thing with the FX extension, and I guess I forgot to reply. Nice looking site btw :)
@markthema3: What do you mean by "AnythingGallery"?
@Ulle: Did you include the extra CSS? I'll repost it here:
<style type="text/css"> #slider1 .panel { opacity: 0; } #slider1 .panel.activePage { opacity: 1; } /* make sure active panel is visible */ </style>
Oh so you want the images to cross-fade. Sadly because of the way AnythingSlider is set up the images are floating side-by-side, so having images cross fade would not be possible. If you really need to have a cross fade, I'm afraid I'll have to recommend another slider. And because you're only using images, I'd recommend using Nivo Slider because of all of the cool slide transitions.
Ok, then I see. Thanks for your help. I already tried Nivo Slider but that doesn't work with image maps which I will have to use. Otherwise that seems really good.
Ok I'm trying to upgrade anythingslider from v1.2 to v1.5.2.0. When I replace the current files with the fx addition, it breaks the slider completely. I wanted to upgrade so I could try the fade part. There is a portion of code in the header.php of this wordpress theme that may likely need to be updated but I'm not sure how. I'm not positive that it's the culprit, but have only a hunch. I've searched and searched the web trying to find a way to resolve this, but unfortunately I haven't found a solution and I'm not so savvy with jquery. Here's the code:
<script type="text/javascript">
jQuery(document).ready(function() { function formatText(index, panel) { return index + ""; }
jQuery(function () { jQuery('.anythingSlider').anythingSlider({ easing: "easeInOutExpo", // Anything other than "linear" or "swing" requires the easing plugin autoPlay: <?php echo $play; ?>, // This turns off the entire FUNCTIONALY, not just if it starts running or not. delay: 4000, // How long between slide transitions in AutoPlay mode startStopped: false, // If autoPlay is on, this can force it to start stopped animationTime: 600, // How long the slide transition takes hashTags: true, // Should links change the hashtag in the URL? buildNavigation: true, // If true, builds and list of anchor links to link to each slide pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover startText: "Go", // Start text stopText: "Stop", // Stop text navigationFormatter: formatText // Details at the top of the file on this use (advanced use) }); jQuery("#slide-jump").click(function(){ jQuery('.anythingSlider').anythingSlider(6); }); }); });
I can't tell what's going on with just the script. It would be easier to help you if you shared a link to your page or include the contents of the head of the page and the slider HTML.
If need be, I can create a test environment on the web so you can take a look, but it is pretty much the same as the theme above with the exception of the navigational menu moved underneath the slider with an absolute position.
I just noticed it says he's using anythingslider version 3.1.3 in his demo when I view the source code and look at the scripts, but if I click on the script and look at the javascript it says v1.2 in the comments. My install does the same thing. Everything in between the title and URI is the same except for the contact form.
Here's what the style area looks like in the header.php
<!-- pad begins --> <div id="pad"> <div> <!-- removed anythingSlider class from here --> <div class="wrapper"> <ul id="slider">
And you'll need to load the new stylesheet and FX extension. With a little extra CSS
<style> div.anythingSlider { padding: 0; margin: 0 0 35px 0; } div.anythingSlider.activeSlider .anythingWindow, div.anythingSlider .anythingWindow { border: 0; } #slider .panel { opacity: 0; } #slider .panel.activePage { opacity: 1; } /* make sure active panel is visible */ </style>
And initialization code
jQuery('#slider').anythingSlider({ width: 1000, height: 320, buildArrows: false, autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not. delay: 3000, // How long between slide transitions in AutoPlay mode startStopped: false, // If autoPlay is on, this can force it to start stopped animationTime: 0, // How long the slide transition takes hashTags: true, // Should links change the hashtag in the URL? buildNavigation: false, // If true, builds and list of anchor links to link to each slide pauseOnHover: true, // If true, and autoPlay is enabled, the show will pause on hover navigationFormatter: formatText // Details at the top of the file on this use (advanced use) }).anythingSliderFx({ // target the entire panel and fade will take 500ms '.panel' : [ 'fade', 1000, 'easeInCirc' ] });
To save you the trouble, I modified the theme so you can see it complete and in action. It's saved to my dropbox, so I may forget someday and delete it.
Thanks so much for the response! I just got back from a very very long drive to pick up my son from the airport. You rock!! ::bows her head in gratitude:: <3 <3 <3
I got flickering (double fade or popping up and then fading in again) when bottom navigation is used. Navigating by arrows works ok in Firefox. IE8 just has the flickering effect - the element is visible to begin with and then fades in, no matter if using arrows or buttons on the bottom. I think it has something to do with what element on the page the fade effect is being applied to. I have
#slider li img{ opacity: 0; } #slider li img.activePage { opacity: 1; }
Try adding a "delayBeforeAnimation" time to see if that fixes it... here is an updated demo - change jQuery from (edge) to 1.6.3, because apparently there is a bug in the jQuery edge version.
I am using CSS Trick's anything slider on a wordpress blog, and it works great! However, I would like to change the animation from a slide to a fadein/out. I know the script is powerful because of how it is able to arrange the elements and slide through them, but based on the context in which I am using it, I need it to fade. I would search for a simple fadein/out gallery, but the anything slider has many other benefits, the counting posts with mini links, the start/stop and stop on hover, etc..., I do not want to delete it entirely, I am just looking to change the animation. I know some jquery, but looking at the script file, it is far too complex for what I know. Any/all help is much appreciated!
Here is a link to the example page for anything slider.
http://css-tricks.com/examples/AnythingSlider/
Thanks in advance.
http://css-tricks.com/examples/AnythingFader/
The problem is the fader will be much simpler, and currently this is just a quick hack to get it done. For example, it still lines all the slides up in a row and clones the first and last and all that, which will not be necessary in the final version.
Looking forward to the finished product.
Question ... I altered the css a bit to have some smaller back and forward buttons -- butnow they aren't working. They display ... but they don't function (and the hover doesn't work either). They're 4 buttons in a sprite -- individual buttons are 15px by 21 px.
Am I missing something?
Thanks for sharing this slider/fader :)
It's great to be able to shrink down those huge previous / next arrows - and have standard play, pause, forward back buttons! Yay!
in ie8 the fade does not happen, the images just flick from one to another.
Cheers
However it would be great if the slides faded from one to the other without a fade to white in between - as does the Jquery Fader Plugin by Philip Floetotto http://philipf.alphacomplex.org/plugins/fader/demo.html (that one unlike yours doesn't have a pause while hovering function or a start/stop button both of which are extremely useful - plus isn't being developed any more).
http://www.mail-archive.com/jquery-en@g ... 88321.html
Basically, all you have to do is remove the absolute positioning CSS rule that Chris added to:
#.anythingFader .wrapper ul { width: 9999px; list-style: none; position: absolute; top: 0; left: 0; background: #eee; border-top: 3px solid #e0a213; border-bottom: 3px solid #e0a213; margin: 0; }
In my instance, I changed it to:
#.anythingFader .wrapper ul { width: 9999px; list-style: none; background: #eee; border-top: 3px solid #e0a213; border-bottom: 3px solid #e0a213; margin: 0; }
I think "position: absolute; top: 0; left: 0;" may be redundant regardless and in my case it did not break anything else.
Double check that you dont have any previously nested styles that may be positioning an ul or li element relative /absolute.
For instance i had previously used something like:
#rightcol ul { position: relative}#rightcol ul li { position: relative}
So if you are still not seeing the animation make sure u havn't got styles like that forcing the child ul lis to position themselves relative!
Here is the page: http://identitypr.com/14962-tri-land-cherokee-south/
Any thoughts on how I screwed this up?
Thanks so much, and please continue to develop this and other useful tools.
-Nathan
Hope there's a way to fix it. Thank you so much Chris for this Plug-in, in my opinion is one of the best sliding plugins.
The only problem is that the opacity of each panel starts at 1, so a little bit of extra css is needed:
I would like to change the stop/start button to a Play/Pause image. Seems to be something that would have to be set in the CSS, any idea how to accomplish this?
Thank you.
Yes, it is just css, I've included a basic template below. The play button has four states: default, hovered, playing and playing & hovered.
Mottie, I believe I've implemented the changes you mentioned above correctly...but the slider now shows the slide moving to the left as it is fading out. The new slide fades in perfectly though. Does anyone have any ideas?
Solved...I had the animationtime still set in the other javascript file under the default settings. I changed that to 0 and took the champaign out of the cooler.
I'm having a hard time getting that code to work.
Any chance on getting the AnythingFader project back up?
AnythingFader does essentially the same thing as the FX extension. I made a demo for you to maybe better help you find the problem you are having.
Thanks again!
Any reason that I wouldn't be able to use bg images on the slides?
What I'm trying to pull off is have a somewhat transparent png overlay on top of another image. I am currently trying to achieve this by putting the png in the and using css to put the other image as a bg image. But it will not show the bg image.
Perhaps there is a better way to do this?
I want this: http://arbiter-design.com/fader/overlay.png
To go over this (or any image that a user could define): http://arbiter-design.com/fader/testslide.jpg
To make this in the slide: http://arbiter-design.com/fader/BannerSlide.jpg
With the intention of putting text in top right corner eventually, but I won't worry about that yet.
You should be able to use any background you want on the slides. I made a demo for you using two methods: the first is how I would do it and the second is the method you described above - it is commented out. Both work, so I'll leave it up to you.
The demo shows the first method by default. I prefer this method since you said the user can define the slider images - background images are only resizable in css3. What this method does is appends an overlay div to each panel. You could also add the text you mentioned inside this div. The div's css adds the overlay image and positions it over the panel image to get the effect you desire.
The second method replaces the img src with the overlay image, then moves the original img src into the panel background. Like I said I don't think this is the best method because of the chance the img isn't the same size as the slider and the user is using a non-css3 browser.
Any fixes for this bug?
Update to the latest version of the slider:
I'm working with the anything fader vs. anything slider. These are f'in awesome works! No other slider out there even compares. I've been experimenting with all of them and seriously? Nice work!
Here's my dilemma? Somewhere in the code my list image rule is getting broken. I believe? What I'm doing is basically creating three columns inside of each slide. Each one of these columns has a list inside of it. The list type image should have a particular image as declared in the (index) style sheet.
When I use the anything slider everything works perfectly, but using the same implementation with the fader the list type images do not show. I assume this rule is being broken somewhere? I know I am calling upon the list correctly because of the border around the list, as you can see in the link I will provide.
jimmykdezign.net/index2
Ive been up for days and don't norm ask for help but I really cant get past why my list images are not showing up within the fader? Please help? :(
One other thought, any chance of an AnythingGallery that does a random transition/animation?
I just started using Anything Slider with fx extension. I want my images to fade out/in. I got them to fade in, but when they should fade out they just disappear, no fading effect there. Any ideas on what I might be doing wrong?
Code looks like this:
@markthema3: What do you mean by "AnythingGallery"?
@Ulle: Did you include the extra CSS? I'll repost it here:
Oh so you want the images to cross-fade. Sadly because of the way AnythingSlider is set up the images are floating side-by-side, so having images cross fade would not be possible. If you really need to have a cross fade, I'm afraid I'll have to recommend another slider. And because you're only using images, I'd recommend using Nivo Slider because of all of the cool slide transitions.
I can't tell what's going on with just the script. It would be easier to help you if you shared a link to your page or include the contents of the head of the page and the slider HTML.
Theme Page: http://www.tofurious.com/2010/09/one-column-photographer-blog-theme/
Demo: http://tofurious.com/blogs/tofu33/
If need be, I can create a test environment on the web so you can take a look, but it is pretty much the same as the theme above with the exception of the navigational menu moved underneath the slider with an absolute position.
I just noticed it says he's using anythingslider version 3.1.3 in his demo when I view the source code and look at the scripts, but if I click on the script and look at the javascript it says v1.2 in the comments. My install does the same thing. Everything in between the title and URI is the same except for the contact form.
Here's what the style area looks like in the header.php
Thank you so much for your response.
The main problem is that AnythingSlider v1.2 still required you to include all the HTML markup. So this HTMLneeds to be changed toAnd you'll need to load the new stylesheet and FX extension. With a little extra CSSAnd initialization codeTo save you the trouble, I modified the theme so you can see it complete and in action. It's saved to my dropbox, so I may forget someday and delete it.
I got flickering (double fade or popping up and then fading in again) when bottom navigation is used. Navigating by arrows works ok in Firefox. IE8 just has the flickering effect - the element is visible to begin with and then fades in, no matter if using arrows or buttons on the bottom. I think it has something to do with what element on the page the fade effect is being applied to. I have
I've tried applying these styles to .panel class, no difference.
http://www.stephanbircher.com/new/sculptures/japanese_test.php
Try adding a "delayBeforeAnimation" time to see if that fixes it... here is an updated demo - change jQuery from (edge) to 1.6.3, because apparently there is a bug in the jQuery edge version.
http://www.stephanbircher.com/new/sculptures/japanese_test.php
I believe because setting opacity to 0 with CSS does not work for IE. http://stackoverflow.com/questions/1948176/opacity-css-not-working-in-ie8
It seems to be working fine for me in IE8... I don't see the blink. Hmm, either way, sorry I guess I forgot to include the css for IE opacity:andIE needs the opacity set by percentage, so use "0" and "100" instead of "0" and "1".
Excellent work, I love this.
However, I would be very greatful if you could amend the JS to allow the tabs to have wording instead of numbering.
There is a solution for the anything slider but this doesn't work with the fader version?
Many Thanks,
John