HTML does not allow you to style title attributes. It seems like the wordpress editor is trying to make sense of your input, and well it obviously didn’t work. What were you trying to achieve with the <strong>
tags.
Hello, Timothy! I am trying to implement mobile friendly tooltips (css+jquery). Just look here http://osvaldas.info/examples/elegant-css-and-jquery-tooltip-responsive-mobile-friendly/ and you’ll see that HTML does allow style title attributes (italics used in the text of a tooltip as you can see on the demo page). The solution by Osvaldas Valutis works for me nicely on a usual html site but I can’t use it in WP because of TinyMCE’s pranks.
I need some rather lengthy tooltips on a few of my pages (additional information for specialists) and I would like them to be styled like this: Volume: blabla… Recommended for: blabla etc.
Hooray! RawHtml plugin did the trick!
Hey Anapest, glad to see you found a solution, but what I am trying to say is that putting styles in the title attribute is not what TinyMCE would expect as valid HTML because on its own the browser will just see it as “Blabla: blablabla.” ie, if you disable javascript that will be what you will see when you hover over to. The jquery plugin is just taking the styles that are present under that attribute, and if you look at the code you will see that it is then just creating a div element with the html from the title attribute and positioning it relative to where the link appears, and then removing the tool tip. So TinyMCE tries to convert those characters into there html equivalents, because it doesn’t know about the jQuery plugin and knows that the html will appear as text.
Thank you for this explanation, Timothy. Surely you have a point. By the way, do you think it would be better to avoid any jquery things on websites because some users may have javascript disabled?
God no. JQuery is a fantastic design tool, but it should only be used as a design tool. i.e. you should make sure that if javascript is disabled that your site still functions properly.