Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js " type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js " type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js " type="text/javascript"></script>
</head>
<body>
<p></p>
<script type="text/javascript">
var MyText = _.extend({myIP:'Clients latitude and longitude is: '}, Backbone.Events);
MyText.on('MyFunction', function () {
$.getJSON("http://ipinfo.io ", function (data) {
console.log(data);
$("p").text(MyText.myIP + data.loc);
});
});
MyText.trigger('MyFunction');
</script>
</body>
</html>
The most helpful BACKBONE.JS solutions
How to get country from client ip address using backbonejs ?BACKBONE.JS Click to see more ... 947 84