I have a JQuery scroller on a page where each item is a div with an id. each div has a link to the next div in the scroller (all on the same page)
$('a.panel').click(function () { }; I have a click event to all links with the 'panel' class where I check which links was clicked and then do some ajax processing accordingly:
if($(this).attr('href')=="#item2") { //do some processsing } and once the processing is done I use the scrollTo JQuery method to scroll to the next div
I need to have it that the user can press the enter key instead of clicking on the link. Now the problem is: a. I have several links on the same page that all need to have this behaviour. b. I need to differentiate which link triggered the click event and do some server-side processing.
Is this possible at all?
I appreciate the quick and helpful responses!!Thanks a million for the help!
click()already, are you sure this doesn't already work as expected? Or did I miss the point of the question?"I need to have it that the user can press the enter key instead of clicking on the link"? Is there only one link? If so, are you just asking how to check if "enter" was pressed?