0
我正在尋找一個腳本,它會在jquery滾動事件後自動打開超鏈接。這是劇本我到目前爲止:jquery滾動事件後打開超鏈接
$(document).ready(function() {
$("a.anchorLink").anchorAnimate()
});
jQuery.fn.anchorAnimate = function(settings) {
settings = jQuery.extend({
speed : 1300
}, settings);
return this.each(function(){
var caller = this
$(caller).click(function (event) {
event.preventDefault()
var locationHref = window.location.href
var elementClick = $(caller).attr("href")
var destination = $(elementClick).offset().top;
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
window.location.hash = elementClick
});
return false;
})
})
}
的滾動部件工作正常,但現在我也希望它的滾動後加載其他頁面。
謝謝您的輸入。
我會建議使用jquery waypoints觸發自動重定向我不知道這是否會工作,因爲我有在同一頁上的5個按鈕需要重定向到不同的頁面[鏈接](http://edenbeach.pepperminds-marketing.com/index.php) 相關內容需要加載到按鈕下方的空間 – Marcel