课程讨论区添加展开、收缩

This commit is contained in:
huang 2016-01-05 16:05:27 +08:00
parent dc77eb6ef6
commit 2efcb5b89a
2 changed files with 16 additions and 10 deletions

View File

@ -42,15 +42,21 @@
$(function () {
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
showNormalImage('activity_description_<%= topic.id %>');
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img");
if (description_images.length>0) {
for (var i=0; i<description_images.length; i++){
var image=$(description_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
if($("#intro_content_<%= topic.id %>").height() > 360) {
$("#intro_content_show_<%= topic.id %>").show();
}
}
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
$("#intro_content_show_<%= topic.id %>").click(function(){
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
$("#intro_content_show_<%= topic.id %>").hide();
$("#intro_content_hide_<%= topic.id %>").show();
});
$("#intro_content_hide_<%= topic.id %>").click(function(){
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= topic.id %>").hide();
$("#intro_content_show_<%= topic.id %>").show();
});
});
</script>
<% if topic %>

View File

@ -959,5 +959,5 @@ span.at {color:#269ac9;}
.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
/*文本描述展开高度*/
.maxh360 {max-height: 760px;}
.maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;}