What I try to accomplish is refreshing the data inside a DIV without reload entire page, but it is not working as expected.
I have this Jquery code:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function() {
$('#Col1').on('click', function() {
var url = 'PurchaseRequestList.asp?order2=PRID';
$('#div1-wrapper').load(url + ' #div1');
});
});
</script>
Below is the HTML codes
<div id="div1-wrapper">
<div id="div1" style="border:solid 1px red; width: 100%;">
<table width="90%" align="center" class="RowDetail">
<tr>
<td><a id="Col1">Column1</a></td>
<td>Column2</td>
<td>Column3</td>
<td>Column4</td>
</tr>
</div>
</div>
If I moved the link (below) outside of the DIV, it will work. But if the link below is inside of the DIV that being refresh with data, it only work for the 1st click, and stop working after that.
<a id="Col1">Column1</a>
Please help with a sample code if possible.