The following jQuery call is not being done:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script>
$('#links').click(function(){
alert($(this).attr('href'));
});
</script>
<a id="links" href="http://www.amazon.com" >Amazon</a>
EDIT:
Also not working with:
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
We don't like to add it <script src="http://code.jquery.com/jquery-latest.min.js"></script>
because jquery versions may not be updated in this file but all code works if we add this.
The above code also not getting desired result if we add it inside
$(document).ready(function() {
$('#links').click(function(){
alert($(this).attr('href'));
});
});