renettarenula / anchorific.js

⚓️ Generates anchored headings and nested anchored-based navigations based on header tags
MIT License
138 stars 30 forks source link

Uncaught TypeError: $(...).anchorific is not a function #29

Open Prekshapatel opened 4 years ago

Prekshapatel commented 4 years ago

I have the issue after updating the Jquery version with Drupal core. JQuery version is 3.4.1 and started getting error Uncaught TypeError: $(...).anchorific is not a function

jamesckemp commented 4 years ago

I am facing this same issue. @Prekshapatel Did you find a solution?

jamesckemp commented 4 years ago

Wrapping it like this fixed the issue for me:

(function( $, document ) {
    function add_article_nav() {
        $( '#article' ).anchorific();
    }

    $( document ).ready( add_article_nav );
}( jQuery, document ));
Prekshapatel commented 4 years ago

I am facing this same issue. @Prekshapatel Did you find a solution?

@jamesckemp - Yeah the issue was the library was deleted so was not able to find it the js, not sure how but adding library back has fixed the issue.