I'm developing an instant search system with jQuery, Ajax and PHP. I created a navigation system for the keyboard arrows in the resulting search options. It's running smoothly. But what I want to do is that when the 'enter' keypad is pressed on top of one of these search options, a 'click' on the selected option is triggered. The problem is that these options are loaded after page loading. So I can not make a click of the traditional way with .click()
on that element.
I tried to use
$(elementoPai).on('click', 'elementoFilho', function(){
});
But this only assigns a callback to when 'elementoFilho'
is clicked. And that's not what I want.
What I want is to set! To click! in this 'element' by typing the enter.
Can anyone help me?
Thank you in advance.