Page 1 of 11
Forum » General » Help & Support » FAQ (N/A)
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>
 
Forum » General » Help & Support » FAQ (N/A)
Page 1 of 11
Search: