1 | $('a.toggle').on('click', function() {
|
2 |
|
3 | if ($(this).text() === 'Screenshot -') {
|
4 | // $(this).text('Screenshot +');
|
5 | $(this).next('a.screenshot').find('img').hide();
|
6 | } else if($(this).text() === 'Screenshot +') {
|
7 | // $(this).text('Screenshot -');
|
8 | $(this).next('a.screenshot').find('img').show();
|
9 | }
|
10 |
|
11 | if ($(this).text().includes(' -')) {
|
12 | $(this).text($(this).text().replace(' -', ' +'));
|
13 | } else {
|
14 | $(this).text($(this).text().replace(' +', ' -'));
|
15 | }
|
16 | });
|