I have problem with making map. I realized it with table, but hover is too slow. So, what instruments can you advice me to solve my problem? Should I use canvas? And what way is better - generate map using json on client or do it on the server?
Full example: http://jsfiddle.net/MSpbW/3/ (table was automatically generated).
html:
<tbody>
<tr>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
</tr>
<tr>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-border"></td>
</tr>
<tr>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-border"></td>
</tr>
<tr>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-empty" style=""></td>
<td class="cell cell-hotel-border"></td>
</tr>
<tr>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
<td class="cell cell-hotel-border"></td>
</tr>
</tbody>
js:
$(document).ready(
function() {
var color;
$(".cell-hotel-empty").hover( function () {
color = $(this).css('background');
$(".cell-hotel-empty").css('background', '0');
}, function() {
$(".cell-hotel-empty").css('background', color);
}
)
}
)