]> git.0d.be Git - panikweb-studioneau.git/commitdiff
remove focus roll when there is a single item
authorFrédéric Péters <fpeters@0d.be>
Thu, 7 Jul 2022 11:53:52 +0000 (13:53 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 7 Jul 2022 11:53:52 +0000 (13:53 +0200)
panikweb_studioneau/templates/includes/footer.html

index d092c3a60f2bdf3e5cf88900a8442650966636ee..55d7e8dfd2a5f2661c2cebf659ce89b831abbbfb 100644 (file)
@@ -24,6 +24,10 @@ $(function() {
  function init_roll_buttons() {
    if ($('#focus').length == 0) return;
    if ($('#focus').hasClass('initialized')) return;
+   if ($('#focus .item').length < 2) {
+     $('#next, #prev').hide();
+     return;
+   }
    if (roll_timeout) {
      clearTimeout(roll_timeout);
      roll_timeout = null;