I'd like to change the 'My Location' button with my own icon (same as the one used on the map for 'my location') and no text. However, I'd like to use the text 'Use my location' on hover.
Hi there,
Thank you for contacting us and I apologize for the delay.
I noticed that the FontAwesome is already loaded on the website, but couldn't locate any "Use my location" button.
To update the icon and text, on regular and mouse hover states, you can include the following script in your view's "JS editor"
tab:
jQuery( document ).ready(function() {
jQuery( ".js-toolset-maps-distance-current-location" )
.mouseover(function() {
// value to show on mouse over state
jQuery( this ).val(jQuery("<div>").html(" Use my location").text());
})
.mouseout(function() {
// value to show on mouse out state
jQuery( this ).val(jQuery("<div>").html("").text());
});
// value to show on page load
jQuery(".js-toolset-maps-distance-current-location").val(jQuery("<div>").html("").text());
});
Feel free to replace all instances of "" with an ASCII code of your desired font icon.
( ref: hidden link )
I hope this helps and please let me know how it goes.
regards,
Waqar
Thanks Waqar. That's perfect!