Javascript examples for jQuery Method and Property:each
Extract multiple data from DOM in jQuery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script> <script type="text/javascript"> $(window).load(function(){/* ww w .j a va2 s . co m*/ var latLng = $('img').data(); $.each(latLng,function(index,value){ console.log(value); }); }); </script> </head> <body> <img src="http://www.java2s.com/style/demo/Safari.png" data-latitude="?"0"" data-longitude="?"0""> ? </body> </html>