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. ; event.relatedTarget – is the element from which the mouse came (relatedTarget → target). Click and Hold to Stop Marquee HTML Marquee Text Start/Stop Examples « Previous; Next » Definition. 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. 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 The window.onscroll event fires when the window has been scrolled. 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 … There are two methods in javascript . I usually use MooTools for my scripting needs, but frameworks can sometimes become a handicap . Onmouseover = “stop()” - it is used to stop marquee line in html . The mouseover() method triggers the mouseover event, or attaches a function to run when a mouseover event occurs. event.target – is the element where the mouse came over. 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). It's based on galambalazs' answer, but with support for touch devices, and refactored as a single object with jquery plugin wrapper.. Demo here. The mouseover event occurs when the mouse pointer is over the selected element. Of course, this is only momentary, such as when I need to display an overlay of some sort. 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:. Scrolling can be disabled using JavaScript using 2 methods: Method 1: Overriding the window.onscroll function. Lets see following some example. In the Html, the marquee tag allows us to scroll a piece of running text or image displayed. Overriding this function and setting it to a fixed position every time the scroll happens will effectively disable the scroll effect. The scroll is “elastic”. I occasionally need to block mouse wheel scrolling when I’m working with JavaScript. The scroll is imprecise. When we scroll to page end, then we may be in fact like 0-50px away from the real document bottom. It can be horizontally or vertically. (See attached image Rotator1.jpg) Note that the images scroll just fine within their size when no stopping or starting take place with mouseover. This solution will maintain the current scroll position whilst scrolling is disabled, unlike some which jump the user back to the top. Note: Unlike the mouseenter event, the mouseover event triggers if a mouse pointer enters any child elements as well as the selected element. HTML