Announcement

Collapse
No announcement yet.

jquery nanogallery2 is not a function error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    jquery nanogallery2 is not a function error

    I'm trying to get a simple tiling gallery working for a gallery page (not the product pages), and I'm only sourcing two script files, jQuery and the Nanogallery2 js files. I'm getting this error as if I'm not referencing the Nanogallery2 js file. Is there a better way to source an open source gallery than what I'm doing? I just want it on my gallery.html page as it's shown here on this Codepen https://codepen.io/Kris-B/pen/LyBwvN


    #2
    test

    Comment


      #3
      I have these references in my header (within script tags which I can't do here) for my gallery page:

      https://cdnjs.cloudflare.com/ajax/li.../jquery.min.js
      https://unpkg.com/nanogallery2/dist/...anogallery2.js

      and I get this error:

      Uncaught TypeError: jQuery(...).nanogallery2 is not a function
      at HTMLDocument.<anonymous> (jquery.nanogallery2.js:15818)

      Comment


        #4
        I figured it out. I was already running jquery with the template, so I removed that. Then I referenced the gallery js library script in the global footer at the end and now it works.

        Comment

        Working...
        X