im using a popup box when i click a link
which is
$(”#search”).click(function(e) {
but i also want to create a shortcut
$.jQee(‘shift+s’, function(e) {
(shift+s) will open the box, is their anyway to combine them into 1 statement, so i dont have to copy the same function?
Why don’t you use “jQuery.bind” ?
You could define the inner function as a named function I think:
http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionnameShould save some space at least; too lazy to test, hope it works.
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Define a single function (with a function name), then just pass that function as a callback instead of using the anonymous function 
Basic idea: http://jsfiddle.net/sevenspark/ESrS3/
thanks guys, ended up doing the function and calling it
