auto open MultiBox onDomReady

I’ve had this request a few times now, so i thought i’ll post the code.

It’s very simple. Just call the open function and pass the element in:

var box = {};
window.addEvent(‘domready’, function(){
box = new MultiBox(‘mb’, {descClassName: ‘multiBoxDesc’});
box.open($(‘mb1′));
});

    • Anonymous
    • September 4th, 2009

    hi,
    i need to know how to close the multibox using custom button or link??

    does any one knows.

    • Anonymous
    • September 16th, 2009

    Can anybody of you tell me, how I can close the box after 5 seconds? (maybe in a function which is called by onOpen)

    Thanks a lot

    • Anonymous
    • September 16th, 2009

    Hi!
    I´ve posted the previous message and I´ve already fixed the problem:
    var box2 ={};
    window.addEvent('domready', function(){box2 = new MultiBox('mb', {descClassName: 'multiBoxDesc', useOverlay: true});
    box2.open($('mb1'));window.setTimeout(function(){box2.close()},'5000'); });

  1. No trackbacks yet.