I don't know why the jquery ajax load function is not responding. When I click on the link that should force the div to load contents of .txt file nothing happens except I get the alert window that indicates the load function ran successfully. Here's the code:
mainTemplate.html
<div class="contentWrapper">
<table>
<thead>
<tr>
<th>
Location
</th>
<th>
Account
</th>
<th>
Industry
</th>
</tr>
</thead>
<tbody>
<tr id="Row1">
<td>
foo
</td>
<td>
foo
</td>
<td>
foo
</td>
</tr>
<tr id="Row2">
<td>
foo
</td>
<td>
foo
</td>
<td>
foo
</td>
</tr>
<tr id="Row3">
<td>
foo
</td>
<td>
foo
</td>
<td>
foo
</td>
</tr>
<tr id="Row4">
<td>
foo
</td>
<td>
foo
</td>
<td>
foo
</td>
</tr>
</tbody>
</table>
<!-- <button>Click Me</button> -->
</div>
The jQuery file:
$(document).ready(function () {
$("[id^=Row]").click(
function () {
$(".contentWrapper").load('foo.txt', function () { alert("Load was performed successfully")});
}
);
});
foo.txt:
<h2>jQuery and AJAX is FUN!!!</h2>
<p id="p1">This is some text in a paragraph.</p>
I'm frustrated here. I'm using Google Chrome as my browser.