Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Plugin not working properly on first load
This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 2 months ago.
- AuthorPosts
- December 17, 2021 at 9:29 pm #36001
Is there a way to add a javascript call to the plugin that re-inits the plugin everytime I load the page where it is used?
Right now I’m having the problem that the plugin is not working when my page loads for the first time. I always have to load it a second time to make it work.
I think this has to do with the AJAX settings of my theme.
The author of my theme said I should ask for a way to re-init the plugin via javascript calls.Thank you in advance.
Regards
Sebastian Ludwig
December 20, 2021 at 2:01 pm #36012Hi,
Sure, you can intialize the plugin via the
ASP.initialize();
code call.There is a built-in feature to detect ajax loads, and try to reload the plugin, that may also work, you can enable it here: https://i.imgur.com/CbUWdBu.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 20, 2021 at 2:27 pm #36014Hey,
Thanks for your reply.
I tried the built.in feature to reload the plugin but it seems not to work.
Can you tell me how to use the above-mentioned code call, unfortunately, I’m not familiar with this.Thank you very much.
Regards
Sebastian
December 21, 2021 at 1:37 pm #36021Hi Sebastian,
I have looked at the issue directly, but this is much more complicated than I thought. The theme seems to be doing some sort of a reloading of the nodes (it does not do ajax loading).
However some of the code does not seem to be executing correclty, causing major issues.Can you please add temporary FTP details? I would like to debug the plugin scripts directly, to see if this is something I can fix from our side, or the theme needs to be adjusted.
Thank you!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 21, 2021 at 2:18 pm #36027You cannot access this content.December 22, 2021 at 2:54 pm #36053You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 28, 2021 at 11:17 am #36096Hey,
Sorry for my late answer.
I found this server name: w01b7deb.kasserver.comDoes this help?
Thank you in advance.
Regards
SebastianDecember 28, 2021 at 3:10 pm #36102Thank you, that works.
Can you please try now? If you clear the cache, does it work now correctly?
Best,
I have made a few changes to try to prevent running the script over and over on clicking the menu items.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 28, 2021 at 10:33 pm #36103I just checked it and it works now.
Thank you very much for your help.
I have one more question.
Is it possible to change the background color of the dropdown menu?
Right now the background color is grey and the font color is white which is a bit hard to read. (see attached picture)
Thank you in advance.
Regards
Sebastian
Attachments:
You must be logged in to view attached files.December 29, 2021 at 12:42 pm #36110Hi,
There is no option for that, however you can do it via some simple custom CSS code. The original font color should be a dark grey, however some theme rules override that. You can restore the original color with this custom CSS:
/* Font color */ .asp_select2-results__option { color: #000; }
If you want to change the backgrounds of the drop-down, and the hovered item background, you can do it with this:
Best,/* Drop-down background */ span.asp_select2-container--open.asp_select2-container--open .asp_select2-dropdown--below, span.asp_select2-container--open .asp_select2-dropdown--above { background: red; } /* Drop-down hovered item background */ span.asp_select2-container--flat .asp_select2-results__option--highlighted[aria-selected] { background: blue !important; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 29, 2021 at 1:52 pm #36112It worked.
Thank you very much.
Regards
SebastianDecember 30, 2021 at 1:49 pm #36124You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.