HELP! Hide empty player list?
-
This is my third and final post for this. It’s very hard to see the replies because WP doesn’t bumb the topics with new replies.
So the problem is:
I’ve already raised a similar topic on this, but it seems to hidden behind other posts. So I’m not getting any answer to this. And now this is getting quite important.
I have made few “subteams” for one team. It’s a junior team, same practices but different games. I made new positions, reds and blacks.
Sportspress is showing custom positions fine, but is also showing the empty defense, offence bad goalkeeper positions.
How to hide those empty position tables? I don’t even have goalkeeper for all the junior teams. Or I can’t define whether the field player is defense or offence.
There seems to be some kind of JS: https://wordpress.org/support/topic/hide-empty-player-lists/
How to utilize this code:
jQuery("div.sp-scrollable-table-wrapper td.dataTables_empty, div.sp-scrollable-table-wrapper table.sp-data-table tbody:empty").parents("div.sp-template-player-list").hide();2nd topic: https://wordpress.org/support/topic/how-to-select-custom-positions-to-player-list/
1st topic: https://wordpress.org/support/topic/how-to-hide-empty-player-list-js-css/Here is the example table I would like to hide. It’s the goal keeper (maalivahti) which can’t be pointed at the moment:
Goalkeeper
<div class="sp-template sp-template-player-list"><a name="group-maalivahti" id="group-maalivahti"></a> <h4 class="sp-table-caption player-group-name player-list-group-name">Maalivahti</h4> <div class="sp-table-wrapper"> <table class="sp-player-list sp-data-table sp-sortable-table sp-scrollable-table sp-paginated-table" data-sp-rows="50"> <thead> <tr> <th class="data-number">#</th> <th class="data-name">Pelaaja</th> <th class="data-position">Pelipaikka</th> </tr> </thead> <tbody></tbody> </table> </div>I also could hide some other tables, for example this defense (puolustaja):
Defense
<div class="sp-template sp-template-player-list"><a name="group-puolustaja" id="group-puolustaja"></a> <h4 class="sp-table-caption player-group-name player-list-group-name">Puolustaja</h4> <div class="sp-table-wrapper"> <table class="sp-player-list sp-data-table sp-sortable-table sp-scrollable-table sp-paginated-table" data-sp-rows="50"> <thead> <tr> <th class="data-number">#</th> <th class="data-name">Pelaaja</th> <th class="data-position">Pelipaikka</th> </tr> </thead> <tbody></tbody> </table> </div>Original page can be found from: https://whm07.louhi.net/~scadmin/juniorit/2009-10-sudet/pelaajat/
The topic ‘HELP! Hide empty player list?’ is closed to new replies.

