Commit 6cb684ae authored by 郭朴讴's avatar 郭朴讴

半导体样式

parent 0f547c08
...@@ -55,7 +55,34 @@ ...@@ -55,7 +55,34 @@
<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");
$("#tab2 .txt p").each(function(){
console.log($(this).height());
if ($(this).height()>100) {
$(this).parent().parent().append("<div class='zkbtn'>展开</div>");
}
})
$("#tab3 p").each(function(){
if ($(this).height()>50) {
$(this).parent().parent().append("<div class='zkbtn'>展开</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("收起")
}else{
$(this).html("展开")
}
})
}) })
</script> </script>
} }
\ No newline at end of file
...@@ -86,6 +86,12 @@ ...@@ -86,6 +86,12 @@
<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>");
var url = $(location).attr('href'); var url = $(location).attr('href');
var oindex = url.indexOf("#"); var oindex = url.indexOf("#");
if (oindex > 0) { if (oindex > 0) {
...@@ -116,6 +122,29 @@ ...@@ -116,6 +122,29 @@
$(con).addClass("active").siblings().removeClass("active"); $(con).addClass("active").siblings().removeClass("active");
}) })
$("#tab2 .txt p").each(function(){
console.log($(this).height());
if ($(this).height()>100) {
$(this).parent().parent().append("<div class='zkbtn'>展开</div>");
}
})
$("#tab3 p").each(function(){
if ($(this).height()>50) {
$(this).parent().parent().append("<div class='zkbtn'>展开</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("收起")
}else{
$(this).html("展开")
}
})
}); });
</script> </script>
......
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