code: function(element, args) {
          if(!args)
              args = {};
          var refreshDelay = args.refreshDelay ? args.refreshDelay : 500;
          var ret = new $.Deferred();
          var elmHeight;
  
          if(element)
              elmHeight = element.height();
          if(elmHeight && elmHeight > 0) {
              ret.resolve(elmHeight);
          } else {
              setTimeout(function () {
                  resolveElementHeight(element, args).then(function(heightData) {
                      ret.resolve(heightData);
                  });
              }, refreshDelay);
          }
  
          return ret;
      }
docs: Method that can return an element's height through a promise (so it'll be resolve only when the element will have a positive height)