Plugin not working properly on first load

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 Ernest Marcinko 2 years, 3 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #36001
    Solo31
    Solo31
    Participant

    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

    #36012
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #36014
    Solo31
    Solo31
    Participant

    Hey,

    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

    #36021
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #36027
    Solo31
    Solo31
    Participant
    You cannot access this content.
    #36053
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #36096
    Solo31
    Solo31
    Participant

    Hey,

    Sorry for my late answer.
    I found this server name: w01b7deb.kasserver.com

    Does this help?

    Thank you in advance.

    Regards
    Sebastian

    #36102
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #36103
    Solo31
    Solo31
    Participant

    I 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.
    #36110
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #36112
    Solo31
    Solo31
    Participant

    It worked.

    Thank you very much.

    Regards
    Sebastian

    #36124
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.