课程动态首页的图片可点击

This commit is contained in:
cxt 2015-09-29 15:02:36 +08:00
parent 7057247700
commit e2a5819d74
1 changed files with 19 additions and 0 deletions

View File

@ -73,6 +73,25 @@
$(function () {
init_activity_KindEditor_data(<%= activity.id%>, null, "87%");
var description_images=$("div#activity_description_<%= activity.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);
}
}
$('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
var reply_images=$("div#reply_content_<%= activity.id %>").find("img");
if (reply_images.length>0) {
for (var i=0; i<reply_images.length; i++){
var image=$(reply_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
});
</script>
<% if activity %>