From 0940aef13e697222cfc60bdb940906725a48017c Mon Sep 17 00:00:00 2001 From: fhackenberger Date: Thu, 31 Jan 2013 16:51:35 +0100 Subject: [PATCH] Make sure it also works in scrolling parents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until this patch the appear plugin did not fire any events in the following scenario:
  ....  
    .....    
 
  ....
--- jquery.appear.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.appear.js b/jquery.appear.js index 837a0b7..00c4e3f 100644 --- a/jquery.appear.js +++ b/jquery.appear.js @@ -73,6 +73,11 @@ }; $(window).scroll(on_check).resize(on_check); + this.parents().each(function() { + $this = $(this); + if($this.css('overflow') == 'scroll' || $this.css('overflow-x') == 'scroll' || $this.css('overflow-y') == 'scroll') + $this.scroll(on_check).resize(on_check); + }); check_binded = true; }