Ben Plum’s Pronto.js
This plugin uses a variant of Ben Plum’s Pronto.js as a backbone
Differences to Pronto Plugin
Therefore, you have all advantages of Pronto plus a few more…:
- Events of the Pronto Plugin can be used transparently
- No server-side hacks necessary!
- Accepts an arbitrary amount of element IDs as an input
- More additional features on top
The pronto events stopped working after I upgraded to the latest version of Ajaxify. I have an Owl slideshow that I was triggering after a Pronto.render but is not longer working. Any help would be gladly appreciated. By the way, great plugin!!!
Hi there,
thanks for pointing that out. What was the last version that worked for you and which is the first version that has the bug?
Thanks and regards, Arvind
I don’t see to find the version number for the old version but I have the date I download it. September 25, 2020. Don’t know if that helps.
This was my original code where I was reloading a custom.js which included the Owl slideshow and google adsense ads:
$(window).on(‘pronto.render’, function(event, eventInfo){
$(document).ready(function(){
$.getScript(‘/js/custom.js’);
$(‘.lazy’).lazy();
});
$(‘ins’).each(function(){
(adsbygoogle = window.adsbygoogle || []).push({});
});
})
Thanks for the detailled description!
I’ll hand this over to testing…
Just one more question: Can you tell whether the Pronto event is being triggered at all?
Hi,
because of ajaxify migration to plain javascript, _trigger function was reworked and now you can catch those events with commands:
window.addEventListener(“pronto.render”, fRender);
window.addEventListener(“pronto.request”, fRequest);
where fRender and fRequest are functions which are handling further.
jQuery for some reason doesn’t react to those events but it should be the case. However, there is no cost of switching to vanilla js event listeners.
Best regards,
Edin
For your particular case that would mean changing of part “$(window).on” to “window.addEventListener”.
Have updated the documentation of the current solution:
and
Fortunately, we are able to tweak it, if you have any suggestions for improvement…