General discussion

Locked

Help my javascript wont ease in from the left!?

By j.stryker119 ·
I'm creating a page where the window slides in from the left to 80% of the page. To do this I have to use only JavaScript. I have been able to get the fade effect and opacity set, but no matter what it wont ease in from the left. I know I'm just missing something, here is my code.
<script type="text/javascript">
var fade_in_from = 0;
var fade_out_from = 50;
function fadeOut(element){
var target = document.getElementById(element);
var newSetting = fade_out_from / 50;
target.style.opacity = newSetting;

fade_out_from--;
if(fade_out_from == 0){
target.style.opacity = 0;
target.style.display = "none";
clearTimeout(loopTimer);
fade_out_from = 50;
return false;
}

var loopTimer = setTimeout('fadeOut(\''+element+'\')',60???

}

function fadeIn(element){
var target = document.getElementById(element);
target.style.display = "block";
var newSetting = fade_in_from / 50;
target.style.opacity = newSetting;
target.style.width

fade_in_from++;
if(fade_in_from == 40){
target.style.opacity = .6;
clearTimeout(loopTimer);
fade_in_from = 0;
return false;

}
var loopTimer = setTimeout('fadeIn(\''+element+'\')',60)???

}
</script>

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Repost as 'Q&A'

by CharlieSpencer In reply to Help my javascript wont e ...

Try reposting this in the 'Q&A' forum. The 'Discussion' forum is for matters of general discussion, not specific problems in search of a solution. The 'Water Cooler' is for non-technical discussions. You can submit a question to 'Q&A' here:

http://www.techrepublic.com/forum/questions/post?tag=mantle_skin;content

There are TR members who specifically seek out problems in need of a solution. Although there is some overlap between the forums, you'll find more of those members in 'Q&A' than in 'Discussions' or 'Water Cooler'.

Be sure to use the voting buttons to provide your feedback. Voting a '+' does not necessarily mean that a given response contained the complete solution to your problem, but that it served to guide you toward it. This is intended to serve as an aid to those who may in the future have a problem similar to yours. If they have a ready source of reference available, perhaps won't need to repeat questions previously asked and answered. If a post did contain the solution to your problem, you can also close the question by marking the helpful post as "The Answer".

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums