I have implemented a scroll bar with in table column. Here i want to scroll the text like marquee. I placed the content with in that scroll div. But my problem is that . i want to stop the marquee by clicking on the scroll bar. simply
when page load marquee(text move from bottom to the top)will be active when clicking or dragging the scroll bar marquee must be disappear( ie effect with out a开发者_Python百科 marquee)
Does any one know this
EDIT: If you are interested in jquery then look at this jQuery Marquee Plugin
On mouseover/mouseout event:
<marquee onmouseover="this.setAttribute('scrollamount', 0, 0);" onmouseout="this.setAttribute('scrollamount', 6, 0);">
your text here
</marquee>
On click event:
<marquee onclick="this.setAttribute('scrollamount', 0, 0);">
your text here
</marquee>
I am not sure if I did understand your question correctly. But if I am right you want to stop an jQuery animation when the user scrolls the window? Therefore you could call the stop()-function when the window fires an scroll-event. E.g.:
$(document).ready(function(){
$(window).scroll(function(){
$('marquee').attr('scrollAmount', 0, 0);
});
});
Updated version: Code to stop marquee on scrolling, but doesn't start again when scrolling is done.
精彩评论