Open sarahkloth opened 9 years ago
I have the same problem :/
same issue here, maybe use a plugin to load twentytwenty after all images are loaded? I'll test this tomorrow
Issue #31 is the same and they gave a fix in comments :)
Using imageloaded is slightly better than using a timeout, if the images are still not loaded after your timeout it still won't work
$('.before-after').imagesLoaded( function() {
$('.before-after').twentytwenty();
});
This made a trick for me:
<div class="twentytwenty-container" id="images">
<img id="myImg" src="galeria/slider/<?php echo($id)?>a.jpg" />
<img id="myImg" src="galeria/slider/<?php echo($id)?>b.jpg" />
</div>
<script>
$(window).on('load',function() {
$("#images").twentytwenty();
});
</script>
I have added the TwentyTwenty plugin for wordpress and it seems to only be loading on browser refresh. Anyone experience this? If you click into any of these you can see what I mean: http://preview.lhkruegerandson.com/before-after-gallery/