here’s my problem.
I have this piece of code that sets the user location as coordinates in a textbox.
var initialLocation;
$('#from').val(initialLocation);
The initialLocation variable gets the user current location as coordinates and then $('#from').val(initialLocation); puts those coordinates in the textbox “from”.
But instead of boring coordinates like “45.542307, -73.567200” I’d like my textbox to simply show “Your location”.
So basically, I want to have the coordinates in my textbox, but change what the user sees from “45.542307, -73.567200” to “Your location”.
Is it possible to do such a thing ?
Thanks !
You can use data method of Jquery which stores data specific to the element