1

I have a div with images scrolling throw responsive slides and next to this div I have navigation buttons to change pages.

I need that buttons to be centered vertically with the images and I have a function to do it:

        function CenterArrow()
        {

            var posV=($("#slider1").height() - $("#navegacao").height())/2;                 
            $("#navegacao").addClass(" visible-lg visible-md");
            $("#navegacao").css('top',posV+'px');
        }


        $(function() 
        {
            $("#slider1").responsiveSlides({
                 maxwidth: 400,
                 speed: 800,
                 timeout: 4000,
          after: function(){
                CenterArrow();
            }
        });
        $("#slider1").show();
      });

In the responsive slides there is an adjust of some image's height, so I need to call CenterArrow after resposive slides.

I tried to put it in the after callback, as you can see in the code above, but in the first slide the navigation buttons don't show.

I've also tried in the before callbakc, and although it shows a few seconds earlier it still doesn't show in the first slide.

Is there a ready callback, or something similar?

Thanks

davidmr
  • 125
  • 1
  • 11

0 Answers0