Use proper server selector.

We need to use the one who fired event, not the first one in document.
This commit is contained in:
Michal Čihař
2010-04-20 08:13:27 +02:00
parent ccd8997f96
commit 980a3bb86c

View File

@@ -4,8 +4,8 @@
*
*/
$(document).ready(function() {
$('.server_selector').change(function() {
var server = $('.server_selector').val();
$('.server_selector').change(function(evt) {
var server = $(evt.target).val();
if (server == 'cur') {
$(this).closest('tbody').children('.current-server').css('display', '');
$(this).closest('tbody').children('.remote-server').css('display', 'none');