Search code examples
eventsmootoolslightboxduration

Mootools Lightbox with Img Slider


I use the Mootools Mediabox for my Site. This one mediaboxAdvanced v1.4.6.

Now i looking for a solution that the image change automatically afer 5 Sec. In the code i found thie

{id:"mbNextLink",href:"#"})).addEvent("click",R)

But didn't found a solution with duration and addEvent.

Best regards


Solution

  • Just by looking at the code you should be able to do it by extending the mediaboxAdvanced code.

    Just look for Mediabox = { in the code and add a function after that. For example:

    showNext: function(){
        next();
    },
    

    then you should be able to use setInterval for example to make it automatically advance after 5 seconds.