文库详情点击收起

dev_bj
caishi 5 years ago
parent 29ea63a98f
commit 97685fb394

@ -78,6 +78,9 @@
<script> <script>
function getMore(item) { function getMore(item) {
var at=$(item).attr("at"); var at=$(item).attr("at");
var one=parseInt($("#private_reason_ul").find("li").eq(0).height())+10;
var two=parseInt($("#private_reason_ul").find("li").eq(1).height());
var plus=one+two;
if(at=="0"){ if(at=="0"){
$(item).html('点击收起<i class="iconfont icon-shangjiantou color-blue font-14 ml5"></i>'); $(item).html('点击收起<i class="iconfont icon-shangjiantou color-blue font-14 ml5"></i>');
$(item).attr("at","1"); $(item).attr("at","1");
@ -85,7 +88,7 @@
}else{ }else{
$(item).html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>'); $(item).html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>');
$(item).attr("at","0"); $(item).attr("at","0");
$(".private_reason").css({maxHeight:"163px"}); $(".private_reason").css({maxHeight:plus+"px"});
} }
} }
var homeworkDescr = editormd.markdownToHTML("labraries_editorMd_content", { var homeworkDescr = editormd.markdownToHTML("labraries_editorMd_content", {

Loading…
Cancel
Save