WordPress.org

Plugin Directory

Changeset 618860


Ignore:
Timestamp:
10/29/12 23:50:09 (18 months ago)
Author:
cfinke
Message:

Infinite Scroll: Backwards compatibility with jQuery 1.6.1, which shipped with WordPress 3.2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/branches/infinite-scroll/modules/infinite-scroll/infinity.js

    r618841 r618860  
    5656        // Ensure that enough posts are loaded to fill the initial viewport, to compensate for short posts and large displays. 
    5757        self.ensureFilledViewport(); 
    58         this.body.on( 'post-load', { self: self }, self.checkViewportOnLoad ); 
     58        this.body.bind( 'post-load', { self: self }, self.checkViewportOnLoad ); 
    5959    } else if ( type == 'click' ) { 
    6060        this.element.append( self.handle ); 
    61         this.element.on( 'click.infinity', '#infinite-handle', function() { 
     61        this.element.live( 'click.infinity', '#infinite-handle', function() { 
    6262            // Handle the handle 
    6363            $( '#infinite-handle' ).remove(); 
     
    115115 
    116116    // Scroll to top on blog title 
    117     blog.on( 'click', function( e ) { 
     117    blog.live( 'click', function( e ) { 
    118118        $( 'html, body' ).animate( { scrollTop: 0 }, 'fast' ); 
    119119        e.preventDefault(); 
     
    302302 
    303303        if ( postsHeight === 0 ) { 
    304             self.body.off( 'post-load', self.checkViewportOnLoad ); 
     304            self.body.unbind( 'post-load', self.checkViewportOnLoad ); 
    305305            return; 
    306306        } 
     
    324324    } 
    325325    else { 
    326         self.body.off( 'post-load', self.checkViewportOnLoad ); 
     326        self.body.unbind( 'post-load', self.checkViewportOnLoad ); 
    327327    } 
    328328} 
Note: See TracChangeset for help on using the changeset viewer.