[Support request] Javascript inserted at WP_footer not working fully.

Home Forums Support [Support request] Javascript inserted at WP_footer not working fully.

Home Forums Support Javascript inserted at WP_footer not working fully.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #836359
    Robbert

    I’m trying to create a tooltip that follows the mouse, as seen in this JSfiddle: https://jsfiddle.net/mgbv5tzx/212/

    I’ve added the JS code to a wp_footer hook, the CSS in SimpleCSS, and the HTML in an HTML block in a blog post. It works, except the tooltip won’t follow the mouse as it does in the JSfiddle example. It just shows up statically.

    I’m not sure whether something in WordPress or Generatepress is overriding what I’m trying to do? Do you have any idea what might solve this issue?

    Best, Rob

    #836398
    David
    Staff
    Customer Support

    Hi there,

    little out of our scope, but if you want to provide us with a link to the site we can take a look to see if is something obvious. You can edit your original topic and use the Site URL for privacy

    #836431
    Robbert

    Hi David, I can’t give you a link to my site since it’s only running locally. However, if you look at this image: https://imgur.com/a/fnLZG3Y you can see the result I’m getting if I’m hovering over the word ‘laborum’.

    It’s basically as if the last three lines of code aren’t running or getting overridden by something. Maybe it doesn’t have anything to do with WordPress or GeneratePress… in which case I’ll keep on looking for a solution.

    #836457
    David
    Staff
    Customer Support

    Check the Console in the Browser Dev Tools to see if there are any errors. Might provide some insight to the issue.

    #836815
    Robbert

    I think I may not be implementing the JS code correctly. If I make a wp_footer element and put the Javascript code between <script type=”javascript”></script>, it should run right? I’ve set it to all pages and all users.

    EDIT: SOLVED: I had it as running for all users, when I changed that to no setting at all, it worked. Maybe somehow GeneratePress’ considers the admin not as part of ‘all users’?

    #836892
    David
    Staff
    Customer Support

    Glad to hear you found the solution. I’ll check Admin as a User with Tom.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.