Jump to content

JavaScript Transition

robeng
Go to solution Solved by CrunchyBadger,

Hey! i have solved to problem.. please add this to your img tag

class="bildFram"

and change your code to

  var bilder = [""];
  var count = 1;

  function bildspel() {
		$(".bildFram").fadeOut(1000, function() {
			document.getElementById("bildFram").src = bilder[count];
			count++;
			if (count > (bilder.length-1)) {
				count = 0;
			}
			setTimeout(function(){ $(".bildFram").fadeIn(1000); }, 1000);
		});
  }

  setInterval("bildspel()",10000);

I put my own images in there, so please change back to yours.

1 minute ago, CrunchyBadger said:

Np, I wont be responding anymore as im gonna get some sleep. cya.

Ok! Bye!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×