Commit 94d1676a authored by 郭朴讴's avatar 郭朴讴

半导体样式

parent 50b70b90
...@@ -55,37 +55,7 @@ ...@@ -55,37 +55,7 @@
<script> <script>
$(function () { $(function () {
$("#tab2 .txt p").wrap("<div style='height: 100px;overflow: hidden;'></div>");
$("#tab3 p").wrap("<div style='height: 50px;overflow: hidden;'></div>");
$("#mainav li").eq(2).addClass("active"); $("#mainav li").eq(2).addClass("active");
setTimeout(function(){
$("#tab2 .txt p").each(function(){
console.log($(this).height());
if ($(this).height()>100) {
$(this).parent().parent().append("<div class='zkbtn'>open</div>");
}
})
$("#tab3 p").each(function(){
console.log($(this).height());
if ($(this).height()>50) {
$(this).parent().parent().append("<div class='zkbtn'>open</div>");
}
})
})
$(".zkbtn").click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).parent().find("p").parent().toggleClass("tdiv");
if ($(this).parent().find("p").parent().hasClass("tdiv")) {
$(this).html("close")
}else{
$(this).html("open")
}
})
}) })
</script> </script>
} }
\ No newline at end of file
...@@ -120,35 +120,20 @@ ...@@ -120,35 +120,20 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab2 .txt p").each(function(){
})
setTimeout(function(){
$("#tab2 .txt p").each(function(){
console.log($(this).height()); console.log($(this).height());
if ($(this).height()>100) { if ($(this).height()>100) {
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); $(this).parent().parent().append("<div class='zkbtn'>open</div>");
} }
}) })
$("#tab3 p").each(function(){ $("#tab3 p").each(function(){
console.log($(this).height()); console.log($(this).height());
if ($(this).height()>50) { if ($(this).height()>50) {
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); $(this).parent().parent().append("<div class='zkbtn'>open</div>");
} }
}) })
}) })
$(".zkbtn").click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).parent().find("p").parent().toggleClass("tdiv");
if ($(this).parent().find("p").parent().hasClass("tdiv")) {
$(this).html("close")
}else{
$(this).html("open")
}
})
}); });
</script> </script>
} }
\ No newline at end of file
...@@ -210,11 +210,7 @@ ...@@ -210,11 +210,7 @@
$(this).addClass("active"); $(this).addClass("active");
var con = $(this).attr("href"); var con = $(this).attr("href");
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
$("#tab2 .txt p").each(function(){
})
setTimeout(function(){
$("#tab2 .txt p").each(function(){
console.log($(this).height()); console.log($(this).height());
if ($(this).height()>100) { if ($(this).height()>100) {
$(this).parent().parent().append("<div class='zkbtn'>open</div>"); $(this).parent().parent().append("<div class='zkbtn'>open</div>");
...@@ -227,7 +223,7 @@ ...@@ -227,7 +223,7 @@
} }
}) })
}) })
$(".zkbtn").click(function(event){ $(".zkbtn").click(function(event){
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment