• Hi Richard – great piece of work and nicely coded. However, not being a coder myself, I’m struggling to see how I can add a tooltip to the Show Again Bar.

    I have tooltips set up on my site http://www.steadiop.com which deliver a relatively consistent look and feel and I’d like to add one to the show again bar to maintain this consistency.

    I have tried editing the functions.php file to add in a title and class attribute to the span pulling through the text and the title shows on hover but it doesn’t call/fire the tooltip. Can you give me any ideas to try please?

    Thanks for your help.

    https://wordpress.org/plugins/cookie-law-info/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Richard

    I think I have narrowed it down… it looks like its because the class isn’t set as the notify html hasn’t been written at that stage (does that make sense – keep in mind I’m not a coder!) so I need to be able to set the class after the Jquery call. Is that something you can help me to figure out?

    Thanks for your help.

    Richard

    (@richardashby)

    Hi, sorry for delay replying- been on holiday 🙂

    I’m not sure of the specific CSS of what you’re trying to do but the cookie bar has all the IDs and classes you’ll need to customise it. It’s just a matter of making sure you declare the CSS in the right place i.e. after the cookie bar has fired.

    As an aside though, why would you want to add tooltips to your site? In this context IMO I think it would just get in the way. Personal preference perhaps.

    Hi Richard

    Its really just to maintain consistency with the rest of the elements on my page. The tool tip wouldn’t get in the way as I have written the CSS to fly out from the right hand side of the button.

    Problem is, despite being able to attach the title attribute and set a class (which all works correctly) the JS/CSS to produce the tooltip doesn’t work (unlike the other elements on the page). Looking at th Java console, its appears to be because the cookie show again button is one of the last things written on the page and therefore, I think the html (notify html) is written after the tooltip.

    Unfortunately, I am not skilled enough to figure this out and after a few days or so trying to sort it, I have given up…

    Richard

    (@richardashby)

    Yeah sounds like you have found the reason and I think that might be a bit fiddly to code, though I doubt impossible. The cookie law info code appends the content to the page once it has loaded, so your script has already finished running.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Tooltip’ is closed to new replies.