Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Height adjustment on window-Scroll and window-Resize
Old 04-09-2008, 09:21 AM Height adjustment on window-Scroll and window-Resize
Novice Talker

Posts: 10
Name: Muhammad Abrar
Trades: 0
HTML Div's Height adjustment is required on window-Scroll and window-Resize both.
This Div is makes the whole HTML body as Clickable (Navigate to specified URL).
I use the following code ,
Body - Onload
document.getElementById('TestDiv').style.height = document.documentElement.clientHeight;
window.onresize = resize;
window.onscroll = scroll;
function resize()
{
if (document.documentElement.scrollTop == 0)
{document.getElementById('TestDiv').style.height = (document.documentElement.clientHeight * 2.175); }
else
{document.getElementById('TestDiv').style.height = (document.documentElement.clientHeight * 5);}

}

function scroll()
{
document.getElementById('TestDiv').style.top = document.documentElement.scrollTop + "px";
}
above code does not make the whole Page background as clickable on Resize and Scroll events.
If any Idea then please give me a chance of thanks
AbrarNazeer is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Height adjustment on window-Scroll and window-Resize
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26513 seconds with 12 queries