我是在制作新闻自动收报机之后,这是我第一次看到这个网站。
http://www.jquerynewsticker.com/
我把代码全部设置成这样
<div class="news_ticker"><link href="LPMS\production_scn\jquery_news_ticker\styles\ticker-style.css" rel="stylesheet" type="text/css" />
<script src="LPMS\production_scn\jquery_news_ticker\includes\jquery.ticker.js" type="text/javascript"></script>
<ul id="js-news" class="js-hidden">
<li class="news-item"><a href="#">This is the 1st latest news item.</a></li>
<li class="news-item"><a href="#">This is the 2nd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 3rd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 4th latest news item.</a></li>
</ul>
<script type="text/javascript">
$(function () {
$('#js-news').ticker();
});
</script>
</div>
我假设这一切都在 1 div 中?它简单地列出了最新项目新闻而不是滚动或任何东西,它几乎就像它没有拿起 jquery 但我已经扎根它来找到源头,任何人都可以为我阐明这一点吗?
编辑/更新
多亏了Java_User,我设法让它有点工作,现在我的问题是它不会显示我要求它输出的内容,即使我更改文本/输入它也只显示一行。
我现在的代码是..这是在头脑中
<link href="/LPMS/production_scn/jquery_news_ticker/styles/ticker-style.css" rel="stylesheet" type="text/css" />
<script src="/LPMS/production_scn/jquery_news_ticker/includes/jquery.ticker.js" type="text/javascript"></script>
</head>
这是在页面的底部(页面的其余部分是空的,以避免任何冲突!)
<div class="clear_line"></div>
<script type="text/javascript">
$(function () {
$('#js-news').ticker();
});
</script>
<!-- News Feed ticker - use jquery to scroll ticker!! -->
<div class="news_feed">
<img src="/LPMS/images/news/breaking_news.png" style="border-style:none;">
<div class="news_ticker"><ul id="js-news" class="js-hidden">
<li class="news-item"><a href="#">This is the 1st latest news item.</a></li>
<li class="news-item"><a href="#">This is the 2nd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 3rd latest news item.</a></li>
<li class="news-item"><a href="#">This is the 4th latest news item.</a></li>
</ul> </div></div>
</div>
any ideas why it displays just an underscore _ like that? its doing my head in!
thanks