Title: Add Tooltip
Last modified: August 21, 2016

---

# Add Tooltip

 *  [Felix Forrest](https://wordpress.org/support/users/felixforrest/)
 * (@felixforrest)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/)
 * 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](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/](https://wordpress.org/plugins/cookie-law-info/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [SteadiOp](https://wordpress.org/support/users/steadiop/)
 * (@steadiop)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/#post-4675362)
 * 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](https://wordpress.org/support/users/richardashby/)
 * (@richardashby)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/#post-4675438)
 * 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.
 *  [SteadiOp](https://wordpress.org/support/users/steadiop/)
 * (@steadiop)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/#post-4675439)
 * 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](https://wordpress.org/support/users/richardashby/)
 * (@richardashby)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/#post-4675440)
 * 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.

 * ![](https://ps.w.org/cookie-law-info/assets/icon.svg?rev=3007243)
 * [CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)](https://wordpress.org/plugins/cookie-law-info/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-law-info/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-law-info/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-law-info/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-law-info/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-law-info/reviews/)

## Tags

 * [ui](https://wordpress.org/support/topic-tag/ui/)

 * 4 replies
 * 3 participants
 * Last reply from: [Richard](https://wordpress.org/support/users/richardashby/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/add-tooltip-2/#post-4675440)
 * Status: not resolved