Sha256: b91c101a91a0626114d3baae9495761653b3aa55ce6ca4778075250372336257
Contents?: true
Size: 672 Bytes
Versions: 16
Compression:
Stored size: 672 Bytes
Contents
$(function() { var keycodes = { space: 32, enter: 13 }; var visitDataUrl = function(event) { if (event.type == "click" || event.keyCode == keycodes.space || event.keyCode == keycodes.enter) { if (event.target.href) { return; } var dataUrl = $(event.target).closest("tr").data("url"); var selection = window.getSelection().toString(); if (selection.length === 0 && dataUrl) { window.location = window.location.protocol + '//' + window.location.host + dataUrl; } } }; $("table").on("click", ".js-table-row", visitDataUrl); $("table").on("keydown", ".js-table-row", visitDataUrl); });
Version data entries
16 entries across 16 versions & 2 rubygems