This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 7 months ago.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › ajax no results click event
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 7 months ago.
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?
Hi!
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:
This will do the trick.
Best,Thank you so much! I love your plugin by the way.
You must be logged in to reply to this topic.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |