Handle click and drag movement to scroll horizontally with mootools or jquery

scroll while dragging javascript
horizontal scroll on click javascript
full page horizontal scroll jquery
jquery horizontal scroll div content
click and drag to scroll div
click and drag scroll
horizontal scroll js
horizontal scroll with mouse wheel codepen

Is there an easy way to handle the movement event composed of click and drag to the left or to the right on a div, in order to do a classic slider. The idea is to do something similar to the scrolling of iphone apps but with left mouse click.

You mean something kind of like this?

var x,y,top,left,down;

    down = true;
    x = e.pageX;
    y = e.pageY;
    top = $(this).scrollTop();
    left = $(this).scrollLeft();

        var newX = e.pageX;
        var newY = e.pageY;

        $("#stuff").scrollTop(top - newY + y);    
        $("#stuff").scrollLeft(left - newX + x);    

$("body").mouseup(function(e){down = false;});


Click inside the area and drag to move around the div. It's quick and dirty, but if that was what you were meaning, it's a good starting point. Unless there's an existing plugin somewhere.

Horizontal Click and Drag Scrolling with JS, Format on Save. If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting. 8 Handle click and drag movement to scroll horizontally with mootools or jquery Apr 23 '11 2 Create dynamic questionnaire from web service .NET Jun 23 '11 1 headless browser supporting JS for .Net Dec 12 '14

ES6 version/Vanilla JS of https://stackoverflow.com/a/5839943/145122

let el = document.querySelector("#yourhtmlelement");
let x = 0, y = 0, top = 0, left = 0;

let draggingFunction = (e) => {
    document.addEventListener('mouseup', () => {
        document.removeEventListener("mousemove", draggingFunction);

    el.scrollLeft = left - e.pageX + x;
    el.scrollTop = top - e.pageY + y;

el.addEventListener('mousedown', (e) => {

    y = e.pageY;
    x = e.pageX;
    top = el.scrollTop;
    left = el.scrollLeft;

    document.addEventListener('mousemove', draggingFunction);

Introducing MooTools ScrollSidebar, to a place on the screen and animate the menu to the current scroll position. MooTools, CSS, jQuery, PHPit has everything! setOptions(options); this.menu = $(menu); this.move = this.options.mode == 'vertical' ? firefox and makes you click the back button the same amount of times you've used the  The drag works great on this example but as soon as I add other elements to the mark-up, anchors + text it’s difficult to drag the interface as you need to find a ‘gap’ to do so. Is it be possible to have the div draggable like when using a phone or tablet as default, so a drag movement on any element works and only a click on the anchors

Hi friend check this out I think this will solve your problem http://www.axure.com/forum/support-axure-com-collection/4418-answered-how-make-scrolling-page-scrollable-content-scroll-dynamic-panel-dragging-scrollbars-vertical-horizontal-drag-ondrag.html and this also http://mootools.net/demos/?demo=Drag.Scroll I think this will help you very much http://dragon.deparadox.com/

Scroll div drag and drop, HTML structure of jQuery UI Sortable is very easy, just we define div as a parent with specific id Move the draggable object by clicking on it with the mouse and dragging it anywhere This example is outdated and will not work with Mootools 1. So Instead of grid level scroll, we are using page level Horizontal Scroll bar. Therefore we can let users scroll by holding the mouse button i.e., dragging. For example, Google maps lets you scroll the map horizontally and vertically by dragging the map using mouse button. In this tutorial I will show you the easiest to provide drag scroll functionality for a scrollable element. Dragscroll

Scroll/Follow Sidebar, Multiple Techniques, We'll cover two: CSS and JavaScript (jQuery) with a bonus CSS trick. margin: 15px auto; position: relative; } #sidebar { width: 190px; position: fixed; margin-left: 410px; } David Walsh in on the case with a MooTools version of the Scrolling Sidebar. Eliminate "Jumps" in Horizontal Centering By Forcing a Scroll Bar. Horwheel – Scroll Horizontally with Mouse Wheel, jQuery plugins

Smooth scroll codepen, Smooth Animated Scroll to Bottom of page example using plain jQuery and no additional jQuery Plugins. Click on the link to see the "smooth" scrolling effect. A horizontal scrolling navigation pattern for touch and mouse with moving current As a result, the browser is able to move this operation to the GPU and you get  Drag to scroll. The last feature I’d like to see is drag to scroll functionality. If a mouse user clicks on the nav and drags it, I want it to behave in the same way it would with touch and drag. I’m going to cheat at this point in a ‘here’s one I made earlier’ style and grab a great little JS script I found called ‘dragscroll’.

Jquery scrolling banner, This horizontal scrolling announcement wordpress plugin lets scroll the On click — grab a timestamp and the current document position. page move slower than foreground images, creating an illusion of depth on a two-​dimensional site. allow for javascript or the appendage of JS libraries like JQuery or MooTools. In today’s post we bring to you 10 jQuery Horizontal Scroll Demos & Plugins useful for those who see things horizontally. I guess we have to accept some people scroll both ways!

  • thanks for de editing @Nicolás