Git Product home page Git Product logo

Comments (1)

pouipouidesign avatar pouipouidesign commented on September 6, 2024

Gnnnn...

Ok, so it so happens that as a last minute idea (the beauty of trying to explain to someone else what bug you're fighting against and realizing you might just have missed something obvious) I thought that just maybe Headhesive wasn't happy because I was trying to instantiate it on an element that isn't present on every page (namely, on that specific page, the back to top button isn't present)...

Instead of just "silently failing" and doing nothing like I (certainly wrongly) assumed it would, it throws that weird error and that cascades to other plugins failing on my page.

SO... if I first test if the DOM element is present with a if ( $('#back-to-top').size() > 0 )condition, it miraculously stops throwing an error and everything is sweet and rosy again :)

Sorry to have bothered you for nothing, I guess I'll close this issue myself?
(darn I'm happy to have solved this but do I feel silly for not thinking of this earlier)

from headhesive.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.