Uncaught TypeError: $ (...) .removeClass (...) .affix is not a function at HTMLDocument.anonymous

0

I have the problem in jQuery, it tells me that affix is not a function, I already did everything I know and more and even then I could not solve it .. can you help me?

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

});
    
asked by anonymous 17.09.2018 / 18:10

1 answer

0

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

It was removed in boostrap from version 4: link

  

Dropped the Affix jQuery plugin. We recommend using a position: sticky   polyfill instead

That is, removed and suggested use position: sticky

    
17.09.2018 / 18:15