41 lines
1.0 KiB
JavaScript
Raw Normal View History

2011-11-07 13:20:19 +00:00
$(document).ready(function(){
2011-09-28 08:44:27 +00:00
2011-12-14 14:27:21 +00:00
$('#tabs').delegate('select.criteres', 'change', function(e){
2011-12-14 13:23:37 +00:00
e.preventDefault();
2011-12-14 14:27:21 +00:00
e.stopPropagation();
alert($(this).attr('name') + ' = ' + $(this, ':selected').val() );
set($(this).attr('name'), $(this, ':selected').val());
return false;
});
$('#tabs').delegate('input[type=checkbox].criteres', 'click', function(e){
e.preventDefault();
e.stopPropagation();
alert($(this).attr('name') + ' = ' + $(this).val() );
return false;
});
$('#tabs').delegate('input[type=radio].criteres', 'click', function(e){
e.preventDefault();
e.stopPropagation();
2011-12-14 13:23:37 +00:00
alert($(this).attr('name') + ' = ' + $(this).val() );
return false;
});
2011-11-07 13:20:19 +00:00
2011-12-14 14:27:21 +00:00
$('#tabs').delegate('input[type=text].criteres', 'blur', function(e){
e.preventDefault();
e.stopPropagation();
alert($(this).attr('name') + ' = ' + $(this).val() );
return false;
});
2011-11-07 13:20:19 +00:00
2011-12-14 14:27:21 +00:00
});
function set(key, value)
{
$.post('/comptage', { cle:key, valeur:value}, function(data, status) {
$('#count').html(data.count);
}, 'json');
}