Created
July 19, 2022 21:23
-
-
Save dislokacia/b44790c16fadbeec161238180fb19eb6 to your computer and use it in GitHub Desktop.
Revisions
-
dislokacia created this gist
Jul 19, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ jQuery(document).ready(function( $ ){ init(); $( document ).on( 'jet-filter-content-rendered', function() { setTimeout(function() { init(); $('.jet-filters-pagination__current .jet-filters-pagination__link').attr('aria-pressed', 'true'); }, 1); }); function init(){ $('.jet-filters-pagination__link').each(function(){ $(this).attr('role', 'button'); $(this).attr('aria-pressed', 'false'); $(this).attr('tabindex', '0'); }); $(".jet-filters-pagination__link").on('keypress',function(e) { if(e.which === 13 || e.which === " " || e.which === "Spacebar" ) { $(this).trigger('click'); }; }); }; });