jquery cycle plugin and ajax

jquery cycle plugin and ajax

I am building a wordpress based site that uses ajax to grab specific posts and display them. The site is: http://burnson.me/

The process I am using is:

  1. $.get(loadUrl, { id: id },
                               function(data){
                                   $('#loader').remove();
                               
                                window.scrollTo(0,0);
                                  
                                   $('#display').html(data);
                                  
                                   startCycle();
                                   //replace header
                                Cufon.replace('h4');

                               });











  2. function startCycle() {
                        $('.images').cycle('destroy');
                       
                        //trigger cycle
                        $('.images').cycle({
                            fx:     'fade',
                            speed:  500,
                            timeout: 0,
                            pager: '#sub-nav .root',
                            prev: "#sub-nav .prev",
                            next: "#sub-nav .next",
                            before: onAfter
                        });
                               
                        $("#sub-nav a:first").addClass("first");
                               
                    }
















 
I am having issues after the cycle is initialized. Sometimes the 'images' div is not setting its height properly which is resulting in elements appearing over the images instead of below them. Also some images are appearing scrunched up. Any help would be greatly appreciated.