Browse Source

Pagination 奇数固定

bc-detail
みてるぞ 9 months ago
parent
commit
2a33a74153
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      broadcast/script.js

+ 4
- 3
broadcast/script.js View File

@@ -88,10 +88,11 @@ Script


for (let i = 20; i > 1; --i) for (let i = 20; i > 1; --i)
{ {
if ($ ('.pagination').width () >= $ ('body').width () * .8)
$ (`.page-${i}`).addClass ('d-none');
else
if (($ ('.pagination').width () < $ ('body').width () * .8)
&& ($ ('.page-item:not(.d-none)').length / 2 % 2 != 0))
break; break;

$ (`.page-${i}`).addClass ('d-none');
} }
} }
} }


Loading…
Cancel
Save