This commit is contained in:
Alexander Agnarson 2018-10-17 20:27:36 +02:00
parent 60049613ea
commit 0c98b32d43
4 changed files with 38 additions and 50 deletions

View file

@ -18,29 +18,6 @@
<div class="post-format">
<?php $images = blogrow_post_images(); if ( !empty($images) ): ?>
<script type="text/javascript">
// Check if first slider image is loaded, and load flexslider on document ready
jQuery(document).ready(function(){
var firstImage = jQuery('#flexslider-<?php echo the_ID(); ?>').find('img').filter(':first'),
checkforloaded = setInterval(function() {
var image = firstImage.get(0);
if (image.complete || image.readyState == 'complete' || image.readyState == 4) {
clearInterval(checkforloaded);
jQuery('#flexslider-<?php echo the_ID(); ?>').flexslider({
animation: "fade",
slideshow: false,
directionNav: true,
controlNav: false,
pauseOnHover: true,
slideshowSpeed: 7000,
animationSpeed: 600,
smoothHeight: true,
touch: false
});
}
}, 20);
});
</script>
<div class="flex-container">
<div class="flexslider" id="flexslider-<?php the_ID(); ?>">
<ul class="slides">