title: Javascript / Jquery OOP not inheriting attributes
body: <p>I have created a Constructor class / function that has 4 methods and a 5 attributes. The problem is when i create a new instance of the constructor it doesn't inherit the first attribute (this.el = element) which is 'affiliateSection' on the new instance called: animation1. Thanks in advance..</p>
  
  <pre><code>// main class
  function AnimateImages(el, time, effect, setTime, h){
  
      this.el = element; // this is not inheriting from 'animate1'
      this.time = time;
      this.effect = effect;
      this.setTime = setTime;
      this.h = height;
  
      this.delayAnimate = function() {
          this.element.delay(time)
              .queue(function(next) {
                  $(this).addClass(effect);
                  next();
              });
      };
  
      // function for multi animations
      var multiAnimations = function() {
          var i = 0;
          this.element.each(function (key, value) {
              i = i + setTime;
              var tthis = this;
              delayAnimate($(this), i, tthis.effect);
          });
      };
  
      // load on window height
      var onWindowAnimate = function () {
          if ($(this).scrollTop() &gt; this.height) {
              // call multi animations function
              var tthis = this;
              multiAnimations(this.element, tthis.setTime, tthis.effect);
          }
      };
      // hide function
      var hideAnimatedEl = function (){
          this.element.each(function(){
  
              $(this).css("visibility", "hidden");
          });
      };
  } // End of AnimateImages
  
  /*============================================================*/
  
   var affiliateSection = $("#aff-img &gt; li &gt; img");
   // new instance of AnimateImages
   var animation1 = new AnimateImages(affiliateSection, 200, 'subtlefadeIn', 
    300, 50);
  
  
   $(window).scroll(function () {
      setTimeout(function(){
          animation1.onWindowAnimate();
  
        }, 1000);
   });
  </code></pre>