Replace Button text on Hover

Hi, is there a way to replace the text button (in header) on hover?
For example I have a button with a phone number, but using a word (1888.I.AM.HERE), and I want the number to appears when I hover (1888.4.26.4373)
Any ideas? If the solution is not to use a button, I’m OK with that

Hi there,

Thanks for writing in! That’t actually possible with custom scripting, first give your button a class e.g custom-button and then add the following code in the Theme Options > JS:

jQuery(document).ready(function($){
	$('.custom-button').hover(function() {
		$(this).find('.x-anchor-text-primary').html('Hovered Text');
		
	}, function(){
		$(this).find('.x-anchor-text-primary').html('Actual Text');
	});
});

Just change Hovered Text’ and Actual Text in the above code. Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

2 Likes

Awesome! Worked like a charm!
Thanks!!!

You’re most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.