Commits

Rune Halvorsen committed d26d391

Updated unbose

Comments (0)

Files changed (1)

site/static/unbose.js

     /**
      * Method: ancestors
      *
-     * Find all ancestors, matching the given selector, to the elements in the set.
+     * Find all ancestors, parent, grandparent and so on, matching the 
+     * given selector, to the elements in the set.
      *
      * Parameters:
      *
      * Returns:
      *
      *   An Unbose object
+     *
+     * See also:
+     *
+     *   <parent>, <closest>
+     *
      */
     ancestors: function(selector) {
         var eles = [];
     /**
      * Method: parent
      *
-     * Get the elements parents.
+     * Get the elements parents. This applies to immediate parents, as
+     * opposed to <ancestors>
      *
      * Parameters:
      *
      *
      * See also:
      *
-     *   <children>
+     *   <children>, <ancestors>
      *
      */
     parent: function(selector) {
      */
     hide: function() {
         return this.forEach(function(ele) {
-            var current = ele._getStyle("display");
-            if (current != "none") { ele.data("olddisplay", current) }
+            var olddisplay = ele._getStyle("display");
+            if (olddisplay != "none") { ele.data("olddisplay", olddisplay); }
             ele._setStyle("display", "none");
         });
     },