first commit
This commit is contained in:
24
衣莎项目/源码/衣莎官网源码/js/pubilc.js
Normal file
24
衣莎项目/源码/衣莎官网源码/js/pubilc.js
Normal file
@@ -0,0 +1,24 @@
|
||||
(function () {
|
||||
// 固定title
|
||||
if ($(window).scrollTop() >= 430) {
|
||||
$("#at").addClass("fixedTab")
|
||||
} else {
|
||||
$("#at").removeClass("fixedTab")
|
||||
}
|
||||
$(window).scroll(function () {
|
||||
var top = $(window).scrollTop() | document.documentElement.scrollTop
|
||||
if ($(window).scrollTop() >= 430) {
|
||||
$("#at").addClass("fixedTab")
|
||||
} else {
|
||||
$("#at").removeClass("fixedTab")
|
||||
}
|
||||
|
||||
})
|
||||
// 切换
|
||||
$(".atitle-cen ul li").click(function () {
|
||||
var index = $(this).index()
|
||||
$(".atitle-cen ul li.alitivce").removeClass("alitivce")
|
||||
$(this).addClass("alitivce")
|
||||
window.scrollTo(0, $(".typec").eq(index).offset().top - 100);
|
||||
})
|
||||
})(window)
|
||||
Reference in New Issue
Block a user