我確定我的問題是由於我在jquery和javascript中缺乏經驗。我正在嘗試使用自動滾動jquery插件。當我點擊應該激活滾動的鏈接時,我只是盯着我。有人可以幫忙嗎?這裏是我的:
我已經調用head
標籤中的相關腳本。
在我身上的標籤結束時,我有這樣的:jquery autoscroll插件沒有解僱
<script type="text/javascript">
$(document).ready(function() {
$("a.hello").click(function() {
$("#text").autoscroll("toggle", {
start: {
step: 50,
scroll: true,
direction: "down",
pauseOnHover: true
},
delay: 5000,
ffrw: {
speed: "fast",
step: 100
}
});
});
});
</script>
於是,我試圖觸發腳本中使用的錨,是這樣的:
<a href="#" class="hello">start/stop</a>
的div
的編號我想'懸停'是「文本」。
該插件的來源和說明發現here。謝謝。
編輯:
從基於表格的其他文件調用一些HTML選擇並將其放入<div id="text"></div>
函數。
function clickMe() {
var book = document.getElementById("book").value;
var chapter = document.getElementById("chapter").value;
var myFile = "'files/" + book + chapter + ".html'";
$('#text').load(myFile + '#source')
}
的代碼,你可以展示你#text的實施? – Starx 2012-04-16 08:19:14
簡單地說,'
'。然後我使用jquery'load()'函數從一組文件中調用一些html,這些文件基於一組表單選擇中的適當選擇。這裏是實際的溫度[網站](http://www.bible.preahkumpii.com/)。 – preahkumpii 2012-04-16 08:22:57