Hi All,
First off, Mike thanks for sharing the plugin! I have used it numerous times, which brings me to a unique situation.
I have a nested cycle on the portfolio section of my site. The outer cycle rotates through projects. The inner cycles rotates through screen shots of that project. I have a half dozen or so projects with several screen shots, each one has a different height.
I am using the callback to run a tallestImg function which seems to randomly work. Do you see any issues here:
- // Cycle Work section
- $('#portfolio').cycle({
- pager: '#port_nav',
- after: tallestImg,
- pagerAnchorBuilder: function(idx, slide) {return '#port_nav li:eq(' + (idx) + ') a';}
- }).cycle('pause');
-
- // Get current slide tallest image
- function tallestImg(curr, next, opts, fwd) {
- var tallest = 0;
- $('#portfolio section').each(function(){
- var bigger = $(this).height();
- if (bigger > tallest) {
- tallest = bigger;
- }
- });
- $('#portfolio').animate({height: tallest});
- }
-
- // Cycle Work individual samples - generate unique navs
- $('.work_slide').each(function(i) {
- $(this).before('<div class="work_nav work'+i+'">').cycle({
- pager: '.work' + i,
- after: tallestImg,
- }).cycle('pause');
- });