Total Complexity | 4 |
Complexity/F | 2 |
Lines of Code | 22 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | (function ($) { |
||
2 | $('.readonly-click-toggle span').entwine({ |
||
3 | |||
4 | RawVal: null, |
||
5 | ShowingRaw: true, |
||
6 | |||
7 | onclick: function () { |
||
8 | if (!$(this).getRawVal()) { |
||
9 | $(this).setRawVal($(this).text()); |
||
10 | } |
||
11 | |||
12 | if ($(this).getShowingRaw()) { |
||
13 | $(this).html($(this).getRawVal()); |
||
14 | $(this).setShowingRaw(false); |
||
15 | } else { |
||
16 | $(this).text($(this).getRawVal()); |
||
17 | $(this).setShowingRaw(true); |
||
18 | } |
||
19 | |||
20 | } |
||
21 | }); |
||
22 | }(jQuery)); |