Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Plugin not working properly on first load
- This topic has 11 replies, 2 voices, and was last updated 4 years, 5 months ago by
Ernest Marcinko.
-
AuthorPosts
-
December 17, 2021 at 9:29 pm #36001
Solo31
ParticipantIs 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 #36012Ernest Marcinko
KeymasterHi,
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
December 20, 2021 at 2:27 pm #36014Solo31
ParticipantHey,
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 #36021Ernest Marcinko
KeymasterHi 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!
December 21, 2021 at 2:18 pm #36027Solo31
ParticipantYou cannot access this content.
December 22, 2021 at 2:54 pm #36053Ernest Marcinko
KeymasterYou cannot access this content.
December 28, 2021 at 11:17 am #36096Solo31
ParticipantHey,
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 #36102Ernest Marcinko
KeymasterThank you, that works.
Can you please try now? If you clear the cache, does it work now correctly?
I have made a few changes to try to prevent running the script over and over on clicking the menu items.December 28, 2021 at 10:33 pm #36103Solo31
ParticipantI 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
December 29, 2021 at 12:42 pm #36110Ernest Marcinko
KeymasterHi,
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:
/* 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; }December 29, 2021 at 1:52 pm #36112Solo31
ParticipantIt worked.
Thank you very much.
Regards
SebastianDecember 30, 2021 at 1:49 pm #36124Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.