I tried to use more than one click handler for anchor tag . One using "Onclick" attribute handler and second using Jquery click handler .
This is my Html file .
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script language="JavaScript" type="text/javascript">
var count = 0;
$("a[href*='google']").click(function(){
count =count +1;
alert(" google called" +count);
});
function clickThis()
{
count = count + 1 ;
alert("its onclick Function call " +count);
}
</script>
</head>
<body >
<a id="foo" onclick="clickThis();" href="http://google.com">google</a>
</body>
</html>
It is running only "onclick" handler . I have checked that handler is right selecting the same anchor tag . But its click handler is not running .
It might be the case that jquery line would not be getting parsed .But as time of parsing the html in browser . it goes from top to bottom , so for script tag parsing , our jquery line would be parsed as like variable (count) declaration .
So what would be the reason that Jquery Click handler is not getting executed on clicking the URL .
And if it execute then what would be the execution order .
Thanks in Advance.