) first move the core of the code to a function: If your reasoning for using the 'title' tag is for Aria compliance, use aria-label instead. Have you tried something? Take a look at How to change the style of Title attribute inside the anchor tag?. To remove the title permanently: $ ('img').removeAttr ('title'); How to Hide Elements with CSS on Your WebHover over a element to show a

element (like a tooltip): div { display: none; } span:hover + div { display: block; } Try it Yourself Example Show and hide a "dropdown" menu on mouse hover: ul { display: inline; margin: 0; padding: 0; } ul li {display: inline-block;} ul li:hover {background: #555;} ul li:hover ul {display: block;} If you would like to hide the entire article then you could do this: article#node-13 { display: none; }. Do new devs get fired if they can't solve a certain bug? Hi Julia. In this snippet, well demonstrate some examples of doing this. < a href="#" class="tooltip">Link < span >CSS tooltip showing up when your mouse over the link Add CSS Making statements based on opinion; back them up with references or personal experience. It removes whatever element you attach it to completely. How can this new ban on drag possibly be considered constitutional? Transition on Hover Googling around landed me many ideas on how to simply remove the title: $ (this).removeAttr ('title'); This removes the title all together which isnt what we want. The edit also works, but only for a tags, could it not work for images also? rev2023.3.3.43278. why do you want to do that? var title = $(this).attr(\"title\"); This was a much needed workaround, and really smooth. In my case, it is not possible to do something like this. Not the answer you're looking for? How can I validate an email address in JavaScript? The easiest method of hiding an element is to remove it entirely. However, its possible to create something similar to it with other attributes. hide To learn more, see our tips on writing great answers. The thing is that you can't use