Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/axene (10-Sep @ 09:35)

remy

Syntax Highlighted Code

  1. $('div.demo marquee').marquee('pointer').mouseover(function () {
  2.     $(this).trigger('stop');
  3. }).mouseout(function () {
  4.     $(this).trigger('start');
  5. }).mousemove(function (event) {
  6.     if ($(this).data('drag') == true) {
  7.         this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
  8.     }
  9. }).mousedown(function (event) {
  10.     $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  11. }).mouseup(function () {
  12.     $(this).data('drag', false);
  13. });
  14.  
  15.  

Plain Code

$('div.demo marquee').marquee('pointer').mouseover(function () {
    $(this).trigger('stop');
}).mouseout(function () {
    $(this).trigger('start');
}).mousemove(function (event) {
    if ($(this).data('drag') == true) {
        this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
    }
}).mousedown(function (event) {
    $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
}).mouseup(function () {
    $(this).data('drag', false);
});

Codedump Run

Permalink: http://codedumper.com/axene