$("#introduction").click(function(){
$("#introductionPanel").slideToggle("fast");
$("#descriptionPanel").slideUp("fast");
$("#standardsPanel").slideUp("fast");
$("#indicatorsPanel").slideUp("fast");
$("#notesPanel").slideUp("fast");
$("#contractsAndLinksPanel").slideUp("fast");
$("#conditionPanel").slideUp("fast");
document.getElementById("introductionImg").src="CTR20140876_files/[email protected]";
document.getElementById("descriptionImg").src="CTR20140876_files/[email protected]";
document.getElementById("standardsImg").src="CTR20140876_files/[email protected]";
document.getElementById("indicatorsImg").src="CTR20140876_files/[email protected]";
document.getElementById("notesImg").src="CTR20140876_files/[email protected]";
document.getElementById("calImg").src="CTR20140876_files/[email protected]";
document.getElementById("conditionImg").src="CTR20140876_files/[email protected]";
});
$("#condition").click(function(){
$("#introductionPanel").slideUp("fast");
$("#descriptionPanel").slideUp("fast");
$("#standardsPanel").slideUp("fast");
$("#indicatorsPanel").slideUp("fast");
$("#notesPanel").slideUp("fast");
$("#contractsAndLinksPanel").slideUp("fast");
$("#conditionPanel").slideToggle("fast");
document.getElementById("introductionImg").src="CTR20140876_files/[email protected]";
document.getElementById("descriptionImg").src="CTR20140876_files/[email protected]";
document.getElementById("standardsImg").src="CTR20140876_files/[email protected]";
document.getElementById("indicatorsImg").src="CTR20140876_files/[email protected]";
document.getElementById("notesImg").src="CTR20140876_files/[email protected]";
document.getElementById("calImg").src="CTR20140876_files/[email protected]";
document.getElementById("conditionImg").src="CTR20140876_files/[email protected]";
});
1
Jhonson OP 这只是 600 行里的其中一些,还有救吗这个页面- -
|
2
fatcheung 2018-03-20 16:41:13 +08:00
为啥一会用原生 js 一会用 jquery 的?内容都一样还不如加个 class 然后遍历来操作
|
3
mcfog 2018-03-20 17:54:32 +08:00
简单的排比句很容易改好啊,列模式两下就改好了
总比巨长巨多的 if else 夹杂 return/break 啊,十个地方分别读写的全局变量啊之类的好改太多了 |