Explorer

How i able to remove the word came out when we put mouse to it.

because i manually editing the font color of the gallery caption. It really worked, but when i go to my webpage and put the mouse on the thumbnail it came out all the including this <font color="orange"></font>

3 REPLIES
Explorer

Re: How i able to remove the word came out when we put mouse to it.

Untitled.png

Community Manager

Re: How i able to remove the word came out when we put mouse to it.

We use the text you enter for the caption for alt/title text with images. Since you entered HTML code this is also going to be a part of those properties. There isn't really a way to change that - I would recommend using just the text, then changing your caption colors via CSS changes.

- Adam
Senior Community Specialist
Scholar

Re: How i able to remove the word came out when we put mouse to it.

@WChun If I understand your issue correctly, you are wishing to remove the default HTML tooltip that appears (the white box with the text). You can achieve this by using JavaScript. The tricky part is finding the class name that is associated with the image. If you right click on your page and click "View Source" it will pull up your page as raw HTML and anything that is included like CSS. Here you can search for " title=' " which will show you items in your page that use the title attribute which is what is coming as the white box with the text. Without seeing your page specifically the best I can do for you is this:

<script>
	var x = document.querySelectorAll('div.galleryInnerImageHolder a');
	for (var i = 0; i < x.length; i++) {
		x[i].removeAttribute('title');
	}
</script>

This code can be put into the page's footer. In my example, I added a caption to a gallery image and found that the title landed in between a div with the class of "galleryInnerImageHolder" that had an "a" tag inside it which is what the title was hooked into. This code searches for every "a" tag that is within a div containing said class, puts them all in a list and then cycles through the list removing every instance of the attribute title that may be applied. I hope this is helpful. Good Luck.