Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Disable Ajax load
This topic contains 11 replies, has 2 voices, and was last updated by Alexander Vinnik 7 years, 1 month ago.
- AuthorPosts
- January 27, 2016 at 7:35 pm #7453
Hello
I need:
– when user click on “try this” keyword it redirects right to search results page;
– when user enters some keyword in search filed and click “Enter” or on “Search icon” it opens a search results page;How to do this?;
January 28, 2016 at 9:05 am #7457Hi!
2. You can enable that on the General Options -> Behavior panel: https://i.imgur.com/rUaziJ7.png
1. There is no option to redirect the “try this” keywords to the results page, however you can use this code snippet, if you have the option above enabled:
<script> var _scope = ASP.getScope(); _scope(function($) { $("p.asp-try a").click(function(){ setTimeout(function(){ var e = $.Event( "keyup", { which: 13 } ); $("input.orig").trigger(e); }, 400); }); }); </script>
You can put this in your active themes folder, into the footer.php file, just before the closing body tag.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 29, 2016 at 6:09 pm #7488Thanks,
How to make it work on mobile version as it works only on desktop version?February 1, 2016 at 11:17 am #7503Hi!
Maybe try to change the script to:
Best,<script> var _scope = ASP.getScope(); _scope(function($) { $("p.asp-try a").click(function(){ setTimeout(function(){ $("div.promagnifier").click(); }, 400); }); }); </script>
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 1, 2016 at 3:46 pm #7516It helped, thanks!
Another question, how to change the font size of “try this” keywords?February 1, 2016 at 3:48 pm #7518You can try a custom CSS code for that, something like:
p.asp-try a { font-size: 18px !important; }
That should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 1, 2016 at 4:12 pm #7519Thank you for fast reply!
February 2, 2016 at 6:15 am #7527Hi
I have a few issues:
1. The script you provided for mobile version:
<script> var _scope = ASP.getScope(); _scope(function($) { $("p.asp-try a").click(function(){ setTimeout(function(){ $("div.promagnifier").click(); }, 400); }); }); </script>
does not work properly, when I save my footer.php file and load my webpage it works only for several searches after that it does not work as it should – it does not redirects to search results but make an ajax search instead;
2. Also I need this search results to open in a new page;
February 2, 2016 at 6:32 am #7528BTW actually this one:
“2. Also I need this search results to open in a new page;”is not needed for now, just need to resolve the 1st issue
February 2, 2016 at 11:24 am #7538Hi,
It’s already a customization workaround, unfortunately I cannot guarantee it’s going to work.
You can try one more thing, maybe lowering the timeout value down to 50, and combining with the previous solution.
First possibility:
<script> var _scope = ASP.getScope(); _scope(function($) { $("p.asp-try a").click(function(){ setTimeout(function(){ $("div.promagnifier").click(); var e = $.Event( "keyup", { which: 13 } ); $("input.orig").trigger(e); }, 50); }); }); </script>
Second possibility:
<script> var _scope = ASP.getScope(); _scope(function($) { $("p.asp-try a").click(function(){ setTimeout(function(){ $("div.promagnifier").click(); }, 50); }); }); </script>
One of them might work correctly, I’m betting on the first one.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 2, 2016 at 4:20 pm #7544Unfortunately it does not help:(
February 2, 2016 at 4:26 pm #7545if there is no other solutions maybe as an alternate to make this:
only for mobile version (if possible?): when you click on try this keyword it just fills the search input with this keyword and then I can click on search button and it opens a search results
-
This reply was modified 7 years, 1 month ago by
Alexander Vinnik.
-
This reply was modified 7 years, 1 month ago by
- AuthorPosts
You must be logged in to reply to this topic.