Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js @ 11020

Last change on this file since 11020 was 11020, checked in by mroscoe, 10 years ago

First check-in for Matt Roscoe. Major revision, multiple new files created and multiple files changed.

File size: 924 bytes
Line 
1/* This file contains the method for shrinking and expanding the collapsable sections */
2
3$(".collapse").click(function () {
4  if ($(this).html() == "-") {
5    $(this).parent().children("canvas, div, fieldset, label").fadeOut();
6    $(this).html("+");
7  }
8  else {
9    $(this).parent().children("canvas, div, fieldset, label").fadeIn();
10    $(this).html("-");
11  }
12});
13
14/* Because Task chart sections are created on the fly adding an event listener
15  was impossible. Therefore this function is hardcoded as an HTML onclick event
16  for the dynamically created buttons of these sections */
17function collapseSection(caller) {
18  var jqCaller = $(caller);
19  if (jqCaller.html() == "-") {
20    jqCaller.parent().children("canvas, div, fieldset, label").fadeOut();
21    jqCaller.html("+");
22  }
23  else {
24    jqCaller.parent().children("canvas, div, fieldset, label").fadeIn();
25    jqCaller.html("-");
26  }
27}
Note: See TracBrowser for help on using the repository browser.