tot - Difference in jquery/jquery.alternation.js versions 7 and 10
Not logged in
[Browse]  [Home]  [Login]  [Reports]  [Search]  [Timeline
  [History
Modified: jquery/jquery.alternation.js
===================================================================
--- jquery/jquery.alternation.js	2007-03-07 18:16:40 UTC (rev 9)
+++ jquery/jquery.alternation.js	2007-03-12 15:15:13 UTC (rev 10)
@@ -16,6 +16,7 @@
  *  </div>
  *
  *  $('.alternation').alternation({
+ *      children:    optional children selector                          (default: 'null')
  *      alternation: alternation type: "sequence" or "random"            (default: 'sequence')
  *      timeout:     alternation time (in ms)                            (default: 2000)
  *      animation:   animation type: "fade" or "slide"                   (default: "fade")
@@ -37,6 +38,7 @@
     /* jQuery static function */
     $.alternation = function(container, options) {
         var settings = {
+            'children':    null,
             'alternation': 'sequence',
             'timeout':     2000,
             'animation':   'fade',
@@ -46,7 +48,10 @@
         };
         if (options)
             $.extend(settings, options);
-        var elements = $(container).children();
+        if (settings.children === null)
+            var elements = $(container).children();
+        else
+            var elements = $(container).children(settings.children);
         if (elements.length > 1) {
             $(container).css('position', 'relative');
             $(container).css('height', settings["height"]);