自从 2 天以来我一直在这个错误上,我的眼睛找不到故障......我想我在某个地方错过了一个支架,我做了一些测试,但没有一个结论。我希望你有比我更好的眼睛来发现故障......
这是脚本。我使用 jQuery 制作了一些带有一些块的动画并调整了页面的高度。没什么特别的 !
var jq = jQuery.noConflict();
jq(document).ready(function () {
var m = 0;
var ss = 0;
var w = jq(window).width();
var h = jq(window).height();
jq("#blShuffleSong").css("width", w + 'px');
jq("#blMG").css("width", w + 'px');
jq("#blProject").css("width", w * 2 + 'px');
var cd = 0;
if (h < 585) {
h = 585;
} // Anti-Bleuark
jq("#showMG").click(function () {
if (ss == 1 && cd == 0) {
shuffleSongtoMG();
} else if (m == 0 && cd == 0) {
showMG();
} else if (m == 1 && cd == 0) {
hideMG();
};
})
jq("#showShuffleSong").click(function () {
if (ss == 1 && cd == 0) {
hideShuffleSong();
} else if (m == 1 && cd == 0) {
misterGladtoShuffleSong();
} else if (m == 0 && cd == 0) {
showShuffleSong();
};
})
jq("#showMG").click(function () {
if (m == 0 && cd == 0) {
jq("#LEFTPRO").css("left", w + 'px');
jq("#LEFTPRO").animate({
left: '10px'
}, 800, 'easeInOutQuint');
}
});
// jq(".linkFrancais").click(function(){
// hmove = h * 0.60;
// jq("#Home").animate({marginTop: hmove+'px'}, 500);
// });
function showMG() {
m = 1;
cd = 1;
jq("#INEEDTOSEEMOARPROJECTDAWG").animate({
height: h + 'px'
}, 300);
jq("#blProject").css("marginLeft", w + 'px');
jq("#blockMG").css("display", "block");
jq("#blProject").css("display", "block");
jq("#blProject").animate({
marginLeft: '0px'
}, 700, 'easeInOutQuint');
next(1000);
}
function showShuffleSong() {
ss = 1;
cd = 1;
jq("#INEEDTOSEEMOARPROJECTDAWG").animate({
height: h + 'px'
}, 300);
jq("#blProject").css("marginLeft", w + 'px');
jq("#blockShuffleSong").css("display", "block");
jq("#blockMG").css("display", "block");
jq("#blProject").css("display", "block");
jq("#blProject").animate({
marginLeft: '-' + w + 'px'
}, 700, 'easeInOutQuint');
next(1000);
}
function misterGladtoShuffleSong() {
m = 0;
ss = 1;
cd = 1;
jq("#blockShuffleSong").css("display", "block");
jq("#blProject").animate({
marginLeft: w + 'px'
}, 700, 'easeInOutQuint', function () {
jq("#blockMG").css("display", "block");
});
next(700);
}
//Braces won't be closed at this point
function shuffleSongtoMG() {
ss = 0;
m = 1;
cd = 1;
jq("#blockMG").css("display", "block");
jq("#blProject").animate({
marginLeft: '0px'
}, 700, 'easeInOutQuint', function () {
jq("#blockShuffleSong").css("display", "none");
});
next(700);
}
function hideMG() {
m = 0;
cd = 1;
jq("#blProject").animate({
marginLeft: w + 'px'
}, 700, 'easeInOutQuint', function () {
jq("#blockMG").css("display", "none");
jq("#blProject").css("display", "none");
jq("#INEEDTOSEEMOARPROJECTDAWG").animate({
height: '315px'
}, 300);
});
next(1000);
}
function hideShuffleSong() {
ss = 0;
cd = 1;
jq("#blockMG").css("display", "block");
jq("#blProject").animate({
marginLeft: w + 'px'
}, 1400, 'easeInOutQuint', function () {
jq("#blProject").css("display", "none");
jq("#blockShuffleSong").css("display", "none");
jq("#blockMG").css("display", "none");
jq("#INEEDTOSEEMOARPROJECTDAWG").animate({
height: '315px'
}, 300);
});
next(1700);
}
function next(t) {
setTimeout(function () {
cd = 0
}, t);
}
function getSize(c) {
var w = jq(window).width();
var h = jq(window).height();
var hp = 0;
var wp = 0;
if (h < 500) {
hp = 500 + 'px'
} else {
hp = h + 'px';
}
jq("#LEFIRSTPAGE").css("height", hp);
if (w < 990) {
wp = 990 + 'px'
} else {
wp = w + 'px';
}
jq("#LEFIRSTPAGE").css("width", wp);
if (c == 1) {
jq("#topContainer").css("height", h * 0.40);
};
hbc = h * 0.60;
hbc = hbc - 140;
hbc = hbc / 2;
if (c == 1) {
jq("#bottomContainer").css("padding", hbc + 'px 0px');
};
}
}
在我添加最新功能之前,所有动画功能都有效,这些功能包括调整某些块的高度。
感谢任何想帮助我的人(以及其他花时间阅读本文的人)