I need the "client" div to slide (rt - lt) from the right side of the
window on page load with a 500ms delay. I've tried repeatedly to
modify the js (which, btw, works great with the click/toggle) but
everything I try either breaks the inline layout or the effect flat-
out doesn't work.
Any insight is appreciated.
Todd
The html:
<div class="wrapper" >
<div id="frame">
<div id="client">Yadda Yadda Yadda</div>
</div>
</div>
The js:
window.addEvent('domready', function(){
var slideLeft = new Fx.Tween('client', {property: 'left',
duration: 500 });
var state = 420;
$('toggle').addEvent('click', function(){
state = (state == 10 ? 420 : 10);
slideLeft.start(state);
});
$('hide').addEvent('click', function(){
slideLeft.start(420);
state = 420;
});
});
The CSS:
#frame {
top: 150px;
right: 0px;
width: 270px;
height: 500px;
position: absolute;
overflow: hidden;
height: 300px;
width: 440px;
display: block;
background-image: url(../resources/frame_index.jpg);
background-repeat: no-repeat;
}
#client {
position: absolute;
top: 18px;
left: 20px;
border: 0;
width: 420px;
height: 260px;
display: block;
}
.wrapper {
margin: 0 auto;
height: 100%;
position: relative;
}
To unsubscribe from this group, send email to
mootools-users+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.