delete-group.js
3 months ago
edit-group.js
1 month ago
form-submission.js
3 months ago
forms.css
3 months ago
icons.css
3 months ago
listShowMore.js
3 months ago
listing.css
3 months ago
listing.js
3 months ago
sort-ads.js
3 months ago
table.css
3 months ago
listShowMore.js
20 lines
| 1 | export function listShowMore() { |
| 2 | const triggers = document.querySelectorAll( |
| 3 | '.advads-group-ads-list-show-more' |
| 4 | ); |
| 5 | |
| 6 | triggers.forEach( ( trigger ) => { |
| 7 | trigger.addEventListener( 'click', function () { |
| 8 | this.style.display = 'none'; |
| 9 | |
| 10 | const target = this.parentElement.previousElementSibling; |
| 11 | if ( target ) { |
| 12 | const divs = target.querySelectorAll( 'div' ); |
| 13 | divs.forEach( ( div ) => { |
| 14 | div.style.display = ''; |
| 15 | } ); |
| 16 | } |
| 17 | } ); |
| 18 | } ); |
| 19 | } |
| 20 |