Skip to content

Coding rules

xavierfav edited this page Feb 8, 2018 · 2 revisions
  • indent: 2 spaces
  • We rely on jQuery for DOM element manipulation and for declaring events
  • An example is worth than thousand words:
// rotate triangle dropdown
function addRotateTriangleEvent(trackId) {
  $(".instrument-label").eq(trackId).click(function () {
    var trackId = $(this).parents('.instrument').index();
    $('.instrument').eq(trackId).find(".glyphicon").toggleClass('rotation');
  });
}
Clone this wiki locally