views:

6

answers:

1

I am using toggle() for 'slideshow pack information of travelle' check code here:

HTML:

www2.mappaturismo.com.br

JAVASCRIPT:

function rota() {
  $(".col-a div.row-a-dois:last").toggle(
    function(){ $(this).fadeIn("slow") }, function(){ $(this).fadeOut("slow") }
  );
  $(".col-a div.row-a-tres:last").toggle(
    function(){ $(this).fadeIn("slow") }, function(){ $(this).fadeOut("slow") }
  );
  $(".col-a div.row-a-dois:first").toggle(
    function(){ $(this).fadeIn("slow") }, function(){ $(this).fadeOut("slow") }
  );
  $(".col-a div.row-a-tres:first").toggle(
    function(){ $(this).fadeIn("slow") }, function(){ $(this).fadeOut("slow") }
  );
}
$(function() {
  setInterval( "rota()", 5000 );
});
A: 

I think you have misunderstood what the jQuery "toggle()" function does. It does not make things happen right away. Instead, it binds event handlers to your elements.

Therefore, calling "toggle()" over and over again like that is pointless.

I'm not sure what it is that you want to happen on your page, so it's hard to say what your code should look like.

Pointy