Hasan Hasan - 10 months ago 45
jQuery Question

Switch img src on slide

I am using Maximage 2 plugin for my web site background slider but if my slider is at third image i want change that image with my logo src.

It's my slider

<div id="maximage">
<img src="assets/img/slide-01.gif" class="img-responsive"/>
<img src="assets/img/slide-02.gif" class="img-responsive" />
<img src="assets/img/slide-03.gif" class="img-responsive" />

It's my logo

<img id="logo" src="assets/img/logo.svg" class="img-responsive" alt="">


You can invoke callback in maximage 'before' and 'after' transition happens!
Maximage has cycleOptions Object. According to official documentation, Here are all options you can pass with cycleOption object. enter image description here

Here is Fiddle.
In fiddle i'm changing Src of logo in 'after' callback, but you can do whatever you want to do in that function.
You can also use 'before' callback.