slideshow callback

slideshow callback


im working with a slideshow on my page and have a problem with some things.

I want to be able to change the body class depending on img class.

on this site

is the api for this slider.

i think it is possible to use the sliderinstance variabel and then use one callback event and then use my own code in this function. 

Ive tried this one.

But it is not working. 

          var sliderInstance = $(”.royalSlider”).data(‘royalSlider’);          

          sliderInstance.ev.on(‘rsAfterSlideChange’, function() { 

          if ($(’#img-klass’).hasClass(‘bright’)) { $(‘body’).addClass(‘dark’); } 

          else if ($(’#img-klass’).hasClass(‘dark’)) { $(‘body’).addClass(‘bright’); } 


I dont want the img class to change after slidewhowchange.

i want the class to change when the img is displaying.

so pleeeeze help me out with this one :)

here is the site im working on and the page with the slidewhow:

Big thanks!!!