Use JQuery Cycle with custom Javascript I have build a view with a HTML-list were all my images are listed. Goal is to create a JQuery Cycle with those images, but for some reason, my custom Javascript isn't working...

Here is the HTML generated by Drupal:

&lt;div class="homepage-slider"&gt;
  &lt;ul&gt;
    &lt;li class="views-row views-row-1 views-row-odd -views-row-first&gt;
      &lt;div class="views-field views-field-field-front-slider-image"&gt;
        &lt;div class="field-content"&gt;
          &lt;img src="image.jpg" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li class="views-row views-row-2 views-row-even&gt;
      &lt;div class="views-field views-field-field-front-slider-image"&gt;
        &lt;div class="field-content"&gt;
          &lt;img src="image.jpg" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li class="views-row views-row-3 views-row-odd -views-row-last&gt;
      &lt;div class="views-field views-field-field-front-slider-image"&gt;
        &lt;div class="field-content"&gt;
          &lt;img src="image.jpg" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


And here is my custom Javascript I wrote:  

(function ($) {
    Drupal.behaviors.initFrontPageSlider = {
        attach: function(context, settings) {
            $('body').once('initFrontPageSlider', function() {
                $('.homepage-slider').cycle({
                    fx: 'fade' 
                });
            });
        }
    }
}(jQuery));


But for some reason, my image-list isn't picking up my javascript. What's missing on this?
If you want to cycle the &lt;li&gt;'s then you need to call .cycle() on the &lt;ul&gt; element. At the moment looks like you're trying to cycle the &lt;ul&gt; elements inside the &lt;div class="homepage-slider"&gt;. If there's only 1 child element cycle doesn't progress further since there's nothing to cycle.