MediaWiki:Common.js: mudanças entre as edições

sem sumário de edição
Sem resumo de edição
Sem resumo de edição
Linha 53: Linha 53:
     $(document).ready(function () {
     $(document).ready(function () {
         var isAscending = true;
         var isAscending = true;
 
         var $sortButton = $('<div class="sort-button" style="width: 25px; height: 25px; background-image: url(https://wiki.otpokemon.com/images/9/92/O-c.png); background-position: center; background-repeat: no-repeat; background-size: cover; border-radius: 3px; cursor: pointer;"></div>');
         var $sortButton = $('<div class="sort-button" style="width: 25px; height: 25px; background-image: url(https://wiki.otpokemon.com/images/e/e2/O-d.png); background-position: center; background-repeat: no-repeat; background-size: cover; border-radius: 3px; cursor: pointer;"></div>');
         $('.square-div-gym').before($sortButton);
         $('.square-div-gym').before($sortButton);


Linha 70: Linha 69:
             $container.append($boxes);
             $container.append($boxes);
             isAscending = !isAscending;
             isAscending = !isAscending;
            var newImage = isAscending
                ? 'https://wiki.otpokemon.com/images/9/92/O-c.png'
                : 'https://wiki.otpokemon.com/images/e/e2/O-d.png';
           
            $sortButton.css('background-image', 'url(' + newImage + ')');
         });
         });
     });
     });
});
});