For that, the sidebar may not be a child of the scrolling container of the main content (which was the browser window), to prevent the scroll … These events are special, because they have property relatedTarget.This property complements target.When a mouse leaves one element for another, one of them becomes target, and the other one – relatedTarget.. For mouseover:. If I understand your question correctly, then you want to prevent scrolling of the main content when the mouse is over a div (let's say a sidebar). However, the image item seems to only stop exactly where the cursor is and on occasion, throw the width off of the next and continuing image items. Onmouseover = “stop()” - it is used to stop marquee line in html . There are two methods in javascript . The mouseover() method triggers the mouseover event, or attaches a function to run when a mouseover event occurs. When we scroll to page end, then we may be in fact like 0-50px away from the real document bottom. I usually use MooTools for my scripting needs, but frameworks can sometimes become a handicap . Lets see following some example. Hi, I have a script that shows a persons thumbnail image and also some details under the image (eg username) this is fetched from the db and then put into JS, the JS basically scrolls the images one by one displaying the image and the data underneith. jQuery Forum Move this topic Forum : Getting Started Using jQuery Using jQuery Plugins Using jQuery UI Developing jQuery Core Developing jQuery Plugins Developing jQuery UI QUnit and Testing About the jQuery Forum jQuery Conferences jQuery Mobile Developing jQuery Mobile Scrolling can be disabled using JavaScript using 2 methods: Method 1: Overriding the window.onscroll function. event.target – is the element where the mouse came over. Click and Hold to Stop Marquee This solution will maintain the current scroll position whilst scrolling is disabled, unlike some which jump the user back to the top. Of course, this is only momentary, such as when I need to display an overlay of some sort. ; event.relatedTarget – is the element from which the mouse came (relatedTarget → target). It can be horizontally or vertically. We can scroll a little beyond the document start or end in some browsers/devices (empty space below is shown, and then the document will automatically “bounces back” to normal). In the Html, the marquee tag allows us to scroll a piece of running text or image displayed. HTML