149
rated 0 times
[
152]
[
3]
/ answers: 1 / hits: 129605
/ 11 Years ago, sat, august 10, 2013, 12:00:00
For the following code:
<span class=map-marker data-lng=101.7113506794></span>
<span class=map-marker data-lng=101.6311097146></span>
var abc = $('.map-marker:first');
var xyz = abc.getAttribute(data-lat);
console.log(xyz);
I get the error message: TypeError: abc.getAttribute is not a function
. What have I done wrong?
More From » jquery