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:'Your device is: '}, Backbone.Events);
MyText.on('MyFunction', function () {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
$("p").text(MyText.myIP + "mobile device");
}
else {
if (screen.width <= 1366 && screen.height <= 780) {
$("p").text(MyText.myIP + "notebook");
}
else {
$("p").text(MyText.myIP + "monitor");
}
}
});
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 ... 946 84