Sign up to create your own snipts, or login.

Public snipts » jameshafner's snipts » Fade Joomla! Message

posted on Dec 03, 2009 at 11:13 a.m. EST in 
  • <script type="text/javascript" >
     var tmjmosmsg,fx;
     function pload(){
     tmjmosmsg=$$('div.message');
     if($type(tmjmosmsg[0])=='element'){
     var el=tmjmosmsg[0];
     el.setStyle('overflow','hidden');
     var h=el.getSize().size.y;
     fx = new Fx.Styles(el, {duration:900, wait:false});
     //scrol to message
     winScroller = new Fx.Scroll(window);
     winScroller.toElement($('header'));//name of header div
     //delayed start, then remove the html element upon completion
     
    (function(){
     
    fx.start({
     
    'margin-top':-1*h.toInt(),
     
    opacity:0
     
     
    }).chain(function(){el.remove();});
    }).delay(2500);
     
     }
     
     };
     
     window.addEvent('load',function(){
     pload();
     }
     
     );
     </script>
    

    copy | embed

0 Comments

Sign up, or login to leave a comment.