I am pretty new in JavaScript and JQuery and I have the following problem.
I have included JQuery 2.1.4 and I am tryng to implement a very simple JQuery script that show thw browser name and its version.
So I am trying to follow this official documentation "tutorial": http://api.jquery.com/jquery.browser/
So, into my page, I done something like this:
<script>
$(document).ready(function() {
alert($.browser.version);
});
</script>
But it don't works infact the popup is not shown and into the FireBug console I obtain the following error message:
TypeError: $.browser is undefined
alert($.browser.version);
Why? What am I missing? How can I fix this issue?
The feature of
$.browser
is deprecated from jQuery v 1.3 and is removed from the jQuery1.9
, so you cannot use it in the jQuery version 2.From the Docs: