Uncaught Typeerror: $(...). removeClass(...). affix is not a Function at Htmldocument.<Anonymous>

Asked

Viewed 47 times

0

I have the problem in jQuery, tells me that affix is not a function, I have done everything I know and more and yet I could not fix it. Can help me?

jQuery(document).ready(function($){
    if ( ($(window).height() + 100) < $(document).height() ) {
        $('#cta-buttons-wrapper').removeClass('hidden').affix({
            offset: {
                top: 100
            }
        });
    }

});

1 answer

0

Your code is correct, and error in affix, the jquery was loaded correctly, so the problem is in itself affix.

It was removed in the boostrap starting with version 4: http://v4-alpha.getbootstrap.com/migration/#Components

Dropped the Affix jQuery plugin. We recommend using a position: Sticky polyfill Instead

That is, removed and suggested to use position: sticky

Browser other questions tagged

You are not signed in. Login or sign up in order to post.