jquery自动滚动为div
问题描述:
我在页面加载时使用jquery自动滚动显示div,当我将鼠标指向scroolling文本时,它会停止滚动直到我删除滚动文本
i am using a jquery automatic scroll for a div when page load and when i point the mouse on scroolling text it shuold stop scrolling until i remove the on the scrolling text
$(document).ready(function () {
$(#demo).scrollbox({
linear: true,
step: 1,
delay: 0,
speed: 100
});
});
和我使用的CSS
and the css i used
.scroll-text {
border: 1px solid red;
width: 400px;
height: 4.5em;
overflow: hidden;
}
.scroll-text tr {
width: 800px;
height: 100px;
overflow: hidden;
margin: 0;
}
.scroll-text tr td {
height: 1.5em;
}
并且aspx页面是
and the aspx page is
<div id="#demo">
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
</div>
plz帮帮我
谢谢
plz help me
thanks
答
这是什么 请参阅 - 如何使用jquery自动滚动到目标div? [ ^ ]了解一种实施方式。否则,您可以查看来自 Google [ ^ ]。
What is this Refer - How to auto scroll to target div with jquery?[^] to know one type of implementation. Otherwise you can check any link from Google[^].
( document )。ready( function (){
(document).ready(function () {
(#demo).scrollbox({
linear: true ,
步骤: 1 ,
延迟: 0 ,
速度: 100
});
});
(#demo).scrollbox({ linear: true, step: 1, delay: 0, speed: 100 }); });
和我使用的CSS
and the css i used
.scroll-text {
border: 1px solid red;
width: 400px;
height: 4.5em;
overflow: hidden;
}
.scroll-text tr {
width: 800px;
height: 100px;
overflow: hidden;
margin: 0;
}
.scroll-text tr td {
height: 1.5em;
}
并且aspx页面是
and the aspx page is
<div id="#demo">
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
<tr>
<td>76ikj,4ntl3jtljlrmotreltjelmlrtpot.reuo<</td>
</tr>
</div>
plz帮帮我
谢谢
plz help me
thanks
问题
Problem
- 您还没有使用过css类div。 所以,你应该使用如下。
- You have not used the css class in the div. So, you should use like below.
<div id="#demo" class="scroll-text">
</div>
写完之后,你所有的css都将被应用。
滚动框功能?您使用的是 jQuery 插件吗?
After you write this, all you css will be applied.
scrollbox function? Are you using any jQuery Plug-ins?
建议
请查看 FireBug 控制台窗口在 FireFox 中,如果您看到任何错误。如果您有任何错误,请尝试解决错误...
Suggestion
Please check the FireBug console window in FireFox, if you see any errors or not. Try to resolve the errors, if you have any...