I am using a plugin named : jkey.
Now i want to use the .deligate() with it.
The basic syntax of this plugin is :
$(document).jkey('a',function(){
jkey.log('You pressed the a key.');
});
QUESTION
How do i supply the arguments like in this i want to send the key value ‘a’ i tried to do this
$("#hmm").delegate(".mm","jkey","a",function() {
$("#get").html("WOW");
});
but failed
The
#hmmneeds to be present at the start and.mmis what is being bound. You also need to give it an event for example'click'The code above doesn’t make much sense but it will listen for a click on an element with class of “mm” inside an existing element with an id of “hmm”. Once click, it’ll bind jkey to the .mm element.
Elaborate a bit on what you’re trying to do and I can give a better example