Hello, I am trying to do a custom redirect if the ajax search results pro returns no results. I see there is a class “asp_nores” and I tried doing a jquery clickEvent but nothing seems to fire. What I tried was $(‘.asp_nores’).click(function(){ console.log(‘clicked’); }); I am not sure if this is because it’s outside of the DOM. Do you have a solution for me?
The issue is, that the element is not present in the dom, but dynamically generated via the ajax request. There is a solution, using an event handler on a higher level static node, and then targeting the child like this: