|
@@ -42,6 +42,14 @@ let jiesaoTop = $('.jiesao').offset().top
|
|
|
let znyqTop = $('.znyq').offset().top
|
|
|
|
|
|
let fill = $('.fill').offset().top
|
|
|
+let filss = ''
|
|
|
+var devicewidth = document.documentElement.clientWidth
|
|
|
+if(document.documentElement.clientWidth < 1900) {
|
|
|
+ var scale = devicewidth / 1920
|
|
|
+ filss = fill * scale
|
|
|
+} else {
|
|
|
+ filss = fill
|
|
|
+}
|
|
|
|
|
|
$(window).scroll(function () {
|
|
|
// 当前滚动的高度
|
|
@@ -94,12 +102,12 @@ $(window).scroll(function () {
|
|
|
$('#selMour8').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfives+','+ znyqToppaddingfives +')'})
|
|
|
}
|
|
|
// 加样式
|
|
|
- // if(currentTop > fill - 300) {
|
|
|
- // $('#fillCon').addClass('fillCons')
|
|
|
- // }
|
|
|
- // if(currentTop < fill - 400){
|
|
|
- // $("#fillCon").removeClass("fillCons");
|
|
|
- // }
|
|
|
+ if(currentTop > filss - 300) {
|
|
|
+ $('#fillCon').addClass('fillCons')
|
|
|
+ }
|
|
|
+ if(currentTop < filss - 400){
|
|
|
+ $("#fillCon").removeClass("fillCons");
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
// tab点击
|
|
@@ -142,7 +150,6 @@ $(function() {
|
|
|
nums--
|
|
|
let conImgLeft = $('.conImg').css('left')
|
|
|
let num = conImgLeft.replace("px","");
|
|
|
- console.log(num, '值')
|
|
|
$('.conImg').animate({
|
|
|
'left': (+num + 510) + 'px'
|
|
|
}, 400)
|
|
@@ -152,10 +159,8 @@ $(function() {
|
|
|
$('#kehuRight').click(function() {
|
|
|
if(nums < 5) {
|
|
|
nums++
|
|
|
- console.log('执行')
|
|
|
let conImgLeft = $('.conImg').css('left')
|
|
|
let num = conImgLeft.replace("px","");
|
|
|
- console.log(num, '值')
|
|
|
$('.conImg').animate({
|
|
|
'left': (+num - 510) + 'px'
|
|
|
}, 400)
|
|
@@ -165,7 +170,6 @@ $(function() {
|
|
|
})
|
|
|
|
|
|
function kehuFlg() {
|
|
|
- console.log(nums)
|
|
|
if(nums == 0) {
|
|
|
$('#kehuLeft').find('img').attr("src", './image/ions/zuos.png')
|
|
|
$('#kehuLeft').addClass("zhis")
|