How can I toggle the page selectors in #pageList using a keyboard shortcut instead of clicking on the .togglePL button? I've tried looking up solutions online and asking questions here, but haven't found a working solution yet. Below is the code snippet for reference. Any help would be greatly appreciated. Thank you!
// Toggle Page List
$(document).ready(function() {
$('.togglePL').click(function(e) {
if ($('#pageList').width() == 40) {
$('.textPL').show();
$('#pageList').width(168);
$('.togglePL').css({left:'192px', transform: 'none'});
$('#pageList a').css({fontSize:'10pt'});
}
else {
$('.textPL').hide();
$('#pageList').width(40);
$('.togglePL').css({left:'64px', transform: 'rotate(180deg)', transitionDuration:'0.3s'});
$('#pageList a').css({fontSize:'14pt'});
}
});
});
/*
~ Copyright (c) Summit Learning Management System (made by students, for students). 2020.
*/
html > body {
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
font-family: "Trebuchet MS", sans-serif;
}
... (CSS Code continues)
<!doctype html>
<!--
~ Copyright (c) Summit Learning Management System (made by students, for students). 2020.
-->
<html lang="en-AU"><head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
... (Head Content continues)