jquery - cycle.js pager issues -
im trying make pager image cycling using plugin: http://jquery.malsup.com/cycle/pager3.html
but tho looks im doing right, pager wont work. here code: ///////////// // pager on left side of slideshow ///////////// <ul class="imagelist"> <?php foreach ($imgs $img) : ?> <li> <a href="#"> <img src="<?php echo $img[0]; ?>" height="64" width ="64" alt="<?php echo $title; ?>" /> </a> </li> <?php endforeach; ?> </ul> ///////////// /// here slider ///////////// <?php $imgs = get_post_images(get_the_id(), 'full'); ?> <div class="imagecycler nextimage"> <?php foreach ($imgs $title => $img) : ?> <div> <img src = "<?php echo $img[0]; ?>" alt = "<?php echo $title; ?>" /> <p class="imageinfo"> <?php echo $img[3]; ?> <p> </div> <?php endforeach; ?> </div> ///////////// /// here jquery ///////////// $(.'imagecycler').cycle({ fx: 'fade', speed: 300, next: '.nextimage', prev: '.previmage', timeout: 0, pager: '.imagelist', pageranchorbuilder: function(idx, slide) { // return selector string existing anchor return '.imagelist li:eq(' + idx + ') a'; } });
this wordpress theme im making thats php is, im pulling image attachments post , listing them out.
main pager element in cycle single container per slideshow. creating many of them in loop , in addition trying append li
elements p
tag invalid html. take pager out of loop , use valid html structure
Comments
Post a Comment