Forums › Forums › Search & Filter Pro › How to put a custom image or icon loader during ajax loading
- This topic has 14 replies, 2 voices, and was last updated 7 years, 9 months ago by Trevor.
-
Anonymous(Private) February 1, 2017 at 12:34 am #87250
Hello,
When you set the ajax mode, and make a search an opacity background appears for some seconds.
Is it possible to replace it with an image or an icon loader, to inform the user that the search is processing?
Thanks for your help,
Best Regards,
Trevor(Private) February 1, 2017 at 11:27 am #87323Hi
When S&F is updating, I think the results container has its opacity set by javascript. This is hard coded into the plugin, so it would need to be an additional feature for us to add. It may well already be on our request list for V3, but, just in case, do you want me to move this thread into that forum?
Anonymous(Private) February 1, 2017 at 10:41 pm #87510Ok,
do you know how I can code it quickly and easily to integrate it into the existing code?
I found the 2 lines to modify in “search-filter-build.js” :
self.$ajax_results_container.animate({ opacity: 0.5 }, “fast”); //loading
self.$ajax_results_container.stop(true,true).animate({ opacity: 1}, “fast”); //finished loadingHow can I code javascript from there to put css code for displaying an icon loader?
Thanks for your help?
Best
Trevor(Private) February 2, 2017 at 5:01 pm #87634Hi
I have no idea. Hacking the core files is not a good idea, as updates will simply wipe the changes. I can add this general topic to the feature request list, if you want, for consideration for V3, but, other than what I have already given, I am out of ideas.
Trevor(Private) February 2, 2017 at 5:17 pm #87644Hi.
Ross tells me it can be done. Rather than repeat what he has said before, I think these two threads might help:
https://support.searchandfilter.com/forums/topic/loading-message/
https://support.searchandfilter.com/forums/topic/display-a-loading-icon/
Trevor(Private) February 3, 2017 at 2:06 pm #87882You would need to add a div to the page that has that class attached, where by default it is set to display: none in CSS. You could do this on every page by adding it to the footer.php file of your theme, as a PHP echo command, and add the css in whichever way your theme allows you to.
-
AuthorPosts