Tell me more ×
Code Review Stack Exchange is a question and answer site for peer programmer code reviews. It's 100% free, no registration required.

http://jsfiddle.net/xkuZF/6/

function func() {
    document.body.scrollTop++;
}

window.onmouseover = function() {
    clearInterval(interval);
};

window.onmouseout = function() {
    interval = setInterval(func);
};

var interval =  setInterval(func);

Do you think that there are any better ways of doing this code?

Better:

  • More options
  • Less code
share|improve this question
1  
In the future, please avoid using pastebins. As stated in the faq, it's much easier to review code when it's here, and your code is very short. – Michael K Jul 15 '11 at 18:12
@Michael, you may have changed his original question which is to say about creating scroll bar manually.jsfiddle.net/xkuZF/6 – didxga Jul 15 '11 at 18:36
@didxga That is the only js code I found at that fiddle - what am I missing? If there's more code, would you suggest an edit? – Michael K Jul 15 '11 at 19:02
No, he is talking about how you deleted the top 25% of my post... – Odinulf Jul 15 '11 at 19:18
@Michael, the <br>s thingy? – didxga Jul 15 '11 at 19:44

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.