I am constructing part of a HTML page and I am using jQuery 1.8 and the “.on” function. Somehow, the jQuery version of the page after running:
$().jquery;
is 1.6.3 and the “.on” method is not found.
Is it possible an old version of jQuery to be rendered after I included mine and it to overwrites the new one?If this happens how can I stop it and why the “on” function is not available if there is no such function in the older version?
Something strange is that If I view the page source only link to my version is available. So, if a older version is loaded in one of the page’s frames, why they are overwriting my jQuery version?
The version that has been loaded last (comes last in your code) – that will be used. Or it will give you an error alltogether and you’ll have to use
.noConflict()for the second one.Also “If I view the page source only link to my version is available” then you really shouldn’t expect the remote version to work. Make sure it is included correctly.