This is the function which I am using to get Table row number
$('#myTable').find('tr').click( function(){
var rownum=$(this).index()
alert('You clicked row '+ (rownum) );
});
The variable rownum I want to use it for further processing. But I am not able to get the value outside it.
How to get it ?
I have tried as suggested here.
<script>
find();
alert('You clicked row '+ (window.rownum) );
</script>
But it did not worked out for me.