The jQuery below gets a partial view containing a html table of addresses. jqModal is then used to display the addresses, and a mouseover used to highlight an address. This works fine on my local machine. When I try running it from a server (Win 2008, IIS 7), the addresses are shown in jqModal but the higlighting fails to work. Also, this works fine when browsing from the server.
<script>
$(document).ready(function() {
$("#Search").click(function() {
displayAddressList();
});
$('#dialog').jqm();
});
function displayAddressList() {
var PostCode = $("#tbSearch").val();
var url = '<%= Url.Action("AddressSearch", "Addresses")%>';
$.get(url, { PostCode: PostCode }, function(data) {
$("#dialog").html(data);
$('table#data_table tr').mouseover(function() {
$(this).addClass('selectedRow');
}).mouseout(function() {
$(this).removeClass('selectedRow');
});
});
}
</script>
<style>
.selectedRow {
background-color: white;
cursor: pointer;
}
</style>
<div class="jqmWindow" id="dialog">
<a href="#" class="jqmClose">Close</a>
</div>