I would like to show list of attachements in my flat view of discussion board in SP2013. Unfortunately i don't have access to SP Designer, so I was trying to use JQuery. But the script from this site, is not working on SP2013. Can anyone help me on this?
EDIT: I am using only first part of the script - without icons! I don't need them.
<script src="/.../Shared%20Documents/jquery-1.11.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
alert("test");
$('.ms-disc-padabove img[src*="attach.gif"]').each(function(index) {
alert("test2");
var divAttachments;
var displayPageURL = $(this).parents().eq(2).next().find('a')[0].href;
displayPageURL += " #idAttachmentsTable";
if (index == 0) {
divAttachments = "<br/><div id='divAttachments" + index + "'></div>";
$($($($(this).parents('.ms-disc-padabove')[0]).parent().next()[0]).find('div')[1]).append($(divAttachments));
} else {
divAttachments = "<br/><div id='divAttachments" + index + "'></div>";
$($($($(this).parents('.ms-disc-padabove')[0]).parent().next()[0]).find('div')[0]).append($(divAttachments));
}
$("#divAttachments" + index).load(displayPageURL);
});
});
</script>