This is my first time here. Hello! So I have configured a mootools multibox to open when the page has loaded. Like so: <script type='text/javascript'> var box11 ={}; window.addEvent('domready', function() { box11 = new MultiBox('mb', {descClassName: 'multiBoxDesc', useOverlay: true, openFromLink: false}); box11.open($('mb11')) }); </script> Code (markup): Now I am trying with all my might to delay the box from opening until about 8 seconds have passed. There is a [waitDuration] option but this doesn't delay the appearance of the box. Instead it delays the box's content from appearing. This is obviously not my solution. Can anyone help me figure out a way to delay the box from opening about 8 seconds? Many thanks.
you could place your code inside of a function and call it using: setTimeout ( expression, timeout );
The solution did have something to do with setTimeout, using it to delay the opening. So the page loads, 15 seconds pass, the multibox appears. <script type="text/javascript"> var box = {}; window.addEvent('domready', function(){ box = new MultiBox('mb', {showNumbers: false, showControls: true, descClassName: 'multiBoxDesc', useOverlay: true}); window.setTimeout(function(){box.open($('mb'))},'15000'); }); </script> Code (markup): Thanks for the assist.
just change 15000 to 8000. milliseconds = seconds * 1000 <script type="text/javascript"> var box = {}; window.addEvent('domready', function(){ box = new MultiBox('mb', {showNumbers: false, showControls: true, descClassName: 'multiBoxDesc', useOverlay: true}); window.setTimeout(function(){box.open($('mb'))},'8000'); }); </script> Code (markup):