Closed rookietect closed 10 years ago
Hello,
I will try and have a proper look at this tomorrow.
My initial guess would be that the ideal way to use the plugin would be to include & set up the bLazy
script outside of the container used by PJAX, then rather than using inline js just adding a bLazy.revalidate();
call in to the PJAX complete
callback.
Granted, I've yet to have a proper look at the code.
Thanks, Carl
Hi Carl,
an update on this would be very much appreciated.
Thanks, rookie
Hello,
I've just had a test and it appears to work as expected for me?
The code I'm currently using is:
var bLazy;
// PJAX links!
pjax.connect({
'container': 'content',
'success': function(event){
bLazy.revalidate();
},
'ready': function(){
bLazy = new Blazy({
success: function(ele){console.log("image loaded");},
error: function(ele, msg){console.log("image failed to load");}
});
}
});
The blazy library itself is added in the head of my test page.
Does that help at all? or was the issue that you only wanted blazy loaded and running on a particular page within your site?
Not heard back on this in a while so will assume its all fixed :)
Hi Carl,
I am trying to get this Lazy Load Plugin - http://dinbror.dk/blog/blazy/ - working. I tried the new branch with the following code:
I included the following code above
<?php $title
:Didn't work — is this approach too optimistic?
Thanks a lot, rookie