padding:4px 8px 4px 26px; /*top right bottom left - last value depends on the icon size (default=16)*/
}
+table.listing tbody td.show_more_videos {
+ text-align:center;
+ padding: 1.5em 0em;
+}
+
.button, .button:visited, .button:hover{
font-weight: bold;
border: 1px solid #e1e1e1;
white-space:nowrap;
+ cursor: pointer;
/* border-top: 1px solid #e1e1e1 !important;
border-left: 1px solid #e1e1e1 !important;
border-right: 1px solid #e1e1e1 !important;
})
}
$('.tabs').tabs();
+
+ // add a "read more" button after first video and hide others vidéos by default
+ $('.course_content.content_video table.listing').each(function(){
+ var $this = $(this);
+ $this.find('tr:not(:first)').hide();
+ // debugger;
+ var colspan = $(this).find('tr:first td').length
+ var buttonRow = $('<tr><td class="show_more_videos" colspan="'+colspan+'"></td></tr>')
+ var button = $('<a class="component_icon button icon_next">Voir les vidéos plus anciennes</a>').bind('click', function(){
+ $this.find('tr:not(:first)').show('fast');
+ buttonRow.hide();
+ });
+ // $this.find('tr:first').appendAfter(buttonRow);
+ $this.find('tr:not(:first)').hide();
+ buttonRow.find('td').append(button)
+ buttonRow.insertAfter($this.find('tr:first'))
+ })
});
\ No newline at end of file