Swarm 2014.1: User Guide

CSS & Javascript

Custom CSS and JavaScript files will be loaded automatically if you place them under either:

  • public/custom/*.(css|js)

  • public/custom/sub-folder/*.(css|js)

Note

Swarm only supports customizations placed directly within the custom folder or one sub-folder down. Items will be added after all standard CSS/JS. If more than one custom file is present they are added in alphabetical order.

Below is an example of a simple JavaScript extension that makes the comment count on the review page clickable.

$(document).on( 'click', '.reviews-table td.comments .badge', function() {
    var change = $(this).closest('tr').data('id');
    window.location = '/reviews/' + change + '#comments'; 
});
0 matching pages