2011-03-28 77 views
0
$('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); 
    }); 

任何人都知道停止的最佳方式,也許在3秒鐘後定時器,暫停3秒,然後繼續?jquery,跑馬燈定時器停止/去

謝謝!

+0

鏈接到'$(...)選框(...)'請? – Eric 2011-03-28 19:27:01

+0

[鏈接](http://plugins.jquery.com/project/marquee)到marquee – Aidiakapi 2011-03-28 19:49:26

回答

1

試試這個:

this.stop();this.start()

+0

你知道我將如何使用計時器將其編碼到當前函數中嗎? – james 2011-03-28 19:38:26

+0

使用'setTimeout()' – Neal 2011-03-28 19:41:26