There is a node like this
<img src="http://x.JPG" data-latitude="0" data-longitude="0">
In jQuery, I can extract two data attribute like this:
a=node.data("latitude")
b=node.data("longitude")
I was wondering whether there is a way to extract multiple data attributes in one time, like this:
latLng = node.data([latitude, longitude]) // not working
latLng = node.data();
this return object
{
latitude:0,
longitude:0
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With