Forums › Forums › Search & Filter Pro › problem with shortcode and ajax reload
- This topic has 7 replies, 2 voices, and was last updated 5 years, 1 month ago by
Trevor.
-
Trevor(Private) June 10, 2020 at 7:15 pm #248393
What plugin does the shortcode come from? If it is using JavaScript to expand the shortcode, that would be why this is happening. Can you show me the full file?
Please note that it is late here in the UK (gone 5PM) and we are closed now for the day, so I will likely not reply until tomorrow.
Trevor(Private) June 11, 2020 at 6:29 pm #248518It certainly looks as though that is the issue. Are you able to contact the author and ask how the shortcode can be refreshed on an Ajax load of the content? We have a jQuery/JavaScript that any code can be embedded in (you can show them this, it will make sense to them:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ // call your script or function here }); }(jQuery));</script>
But …, looking at the code, this might do it:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ $('.foogallery').foogallery(); }); }(jQuery));</script>
Assuming I have understood the problem, that the gallery isn’t working, yes?
-
AuthorPosts