• Page 1 of 1
  • 1
FAQ
OfflineBeanie
Admin

Posts: 17

Awards: 0


Code
<script type="text/javascript">
  function handleBtnClick(event) {
    event = event || window.event;
    var pressed = event.target.getAttribute("aria-pressed") == "true";
    //change the aria-pressed value as the button is toggled:
    event.target.setAttribute("aria-pressed", pressed ? "false" : "true");
    //... (perform the button's logic here)
  }

  function handleBtnKeyUp(event) {
    event = event || window.event;
    if (event.keyCode === 32) { // check for Space key
      handleBtnClick(event);
    }
  }
 </script>
 
  • Page 1 of 1
  • 1
Search: