Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.79 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to capture onstop in marquee
  2. $(document).ready(
  3.         function(){
  4.         $('div.demo').marquee('pointer')
  5.          .bind('stop', function() {alert($(this).text())})
  6.          .mouseover(function () {
  7.             $(this).trigger('stop');            
  8.             //alert($(this).html());            
  9.         }).mouseout(function () {
  10.             $(this).trigger('start');
  11.         }).mousemove(function (event) {
  12.             if ($(this).data('drag') == true) {
  13.                 this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
  14.             }
  15.         }).mousedown(function (event) {
  16.             $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  17.         }).mouseup(function () {
  18.             $(this).data('drag', false);
  19.         })
  20.     });