This commit is contained in:
wangjinlei
2023-05-18 09:42:12 +08:00
commit 6e7ee3dd44
1214 changed files with 103535 additions and 0 deletions

43
js/profile.min.js vendored Normal file
View File

@@ -0,0 +1,43 @@
(function () {
$.fn.extend({
profile: function () {
var a = this.children(".profile_right"), b = this.children(".profile_left"),
c = a.find(".profile_right_cnt>p");
b.find(".a-anchors").each(function (e, f) {
$(this).attr({
"id": function () {
return "a" + e
}
})
});
a.find(".a-anchors").each(function (e, f) {
$(this).attr({
"id": function () {
return "a" + e + e
}, "href": function () {
return "#a" + e
}
})
});
a.find(".profile_right_cnt>p").on("click", function () {
$(this).addClass("floatnav_a_cur").siblings().removeClass("floatnav_a_cur")
$("html, body").animate({
scrollTop: $($(this).find('a').attr("href")).offset().top + "px"
}, {
duration: 500,
easing: "swing"
});
return false;
});
$(window).scroll(function () {
var d = $(window).scrollTop();
for (i = 0; i < c.length; i++) {
if ($("#a" + i).offset().top <= d) {
c.removeClass("floatnav_a_cur");
$("#a" + i + i).parent().addClass("floatnav_a_cur")
}
}
})
}
})
})();