Last active
August 29, 2015 14:16
-
-
Save GMMan/43a8f1c4ca92aca7184e to your computer and use it in GitHub Desktop.
Fun with JQuery on Groupees
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.4.6/mousetrap.min.js', function() | |
{ | |
Mousetrap.stopCallback = function() { return false; }; | |
Mousetrap.bind('alt+1', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(0); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+2', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(1); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+3', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(2); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+4', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(3); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+5', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(4); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+6', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(5); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+7', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(6); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+8', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(7); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+9', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(8); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
Mousetrap.bind('alt+0', function() { var el = chatBoxer.el.children('span.tab[data-chat-id]').eq(9); if (el) { el.children().eq(1).click(); el.next().find('input[type=text]').focus(); } }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment