{"action":"opened","issue":{"number":6,"created_at":"2011-10-17T12:01:53Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I want to use different shortcuts on the same page and have added the following to my rails application.js file:\r\n\r\n```javascript\r\nfunction _mapShortcuts() {\r\n  var elements = document.getElementsByClassName(\"shortcut\");\r\n  for (var i = 0; i < elements.length; i++) {\r\n    var ele = elements[i];\r\n    var shortcut = ele.getAttribute('data-shortcut');\r\n    var path = ele.getAttribute('data-path');\r\n    $.shortcut.add(shortcut, function(){ \r\n      window.location = path;\r\n    })\r\n  }\r\n}\r\n$(function() {   _mapShortcuts() });\r\n\r\nIn the Rails code, I insert code so that the resulting HTML page has the following part:\r\n\r\n```html\r\n<a href=\"/notices/128/edit\" class=\"shortcut\" data-path=\"/notices/128/edit\" data-shortcut=\"ctrl+e\">Edit</a>\r\n<a href=\"/notices\" class=\"shortcut\" data-path=\"/notices\" data-shortcut=\"ctrl+b\">Back</a>\r\n\r\nWhen I now visit the page and press CTRL-E (for editing), I'm redirected to the url http://localhost/notices which has the shortcut CTRL-B.\r\n\r\nIs it possible to use more than one shortcut on the same page for the same element?","comments":0,"title":"jquery.okShortcut with 2 shortcuts on the same page does not work","updated_at":"2011-10-17T12:01:53Z","url":"https://api.github.com/repos/okbreathe/jquery_plugins/issues/6","id":1927710,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"03a2605738b192a49b8faae516629b21","avatar_url":"https://secure.gravatar.com/avatar/03a2605738b192a49b8faae516629b21?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/mliebelt","id":520039,"login":"mliebelt"},"html_url":"https://github.com/okbreathe/jquery_plugins/issues/6","labels":[],"state":"open"},"legacy":{"number":6,"action":"opened","issue":1927710}}