Lists - Anybody have an experience with Javascript/Jquery?

24th of March 2014 0

Anybody have an experience with Javascript/Jquery?

Hi, I’m writing a simple website for me and my friend but I want it to look good eventually. I started today, bought the domain this morning and have got to this point. I have our header at the top, used some CSS to centre align and I want a basic javascript animation/slideshow of some photos with a smooth fade in and fade out.

I used some docs and my very limited knowledge of java script to form this code:
function slideSwitch() {
var $ active = $ (‘#slideshow IMG.active’);

if ( $ active.length == 0 ) $ active = $ (‘#slideshow IMG:last’);

var $ next = $ active.next().length ? $ active.next()
: $ (‘#slideshow IMG:first’);

$ active.addClass(‘last-active’);

$ next.css({opacity: 0.0})
.addClass(‘active’)
.animate({opacity: 1.0}, 1000, function() {
$ active.removeClass(‘active last-active’);
});
}

$ (function() {
setInterval( “slideSwitch()”, 5000 );
});

but when the site loads, I see the final picture of the animation and that is it. Could there be something else wrong? I don’t understand, the javascript seems right..
If you want to see what I mean take a look:

http://www.mobjet.co.uk

thanks

Best answer:

Answer by Paramesh C
Have u checked it using Chrome,,,Because it works…..
I could see the slideshow….

Also u can download the script for slideshow from here..

http://nivo.dev7studios.com/

What do you think? Answer below!

Filed under § jquery animate — Tagged with , , ,

Share it!

Was it good for you to?

Sponsors

Support for the site!

No sponsors at the moment.



Your opinion matters. Add it below.


Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments

Categories



Copyright jqueryui.info since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.