<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script type="text/javascript">
var val;
$(document).ready(function () {
$("#click").click(function () {
val = 1;
get();
});
});
function get(){
if (val == 1){
alert(val);
}
}
</script>
<table>
<tr><td id='click'>ravi</td></tr>
</table>