ERR FIX: наложение фильтров 2
This commit is contained in:
parent
8cbbd15829
commit
04c204fc57
@ -82,27 +82,12 @@
|
||||
|
||||
{% block JS_1 %}<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#type').change(function(){
|
||||
let t = $(this).find("option:selected").attr('value');
|
||||
let s = $('#sex').find("option:selected").attr('value');
|
||||
if (t === 'tA')
|
||||
$('tbody > tr').show();
|
||||
else {
|
||||
$('tbody > tr').hide();
|
||||
$('tbody > tr.' + t).show();
|
||||
}
|
||||
if(s !== 'sA') $('tbody > tr:not(.' + s +')').hide();
|
||||
});
|
||||
$('#sex').change(function(){
|
||||
let s = $(this).find("option:selected").attr('value');
|
||||
$('#type,#sex').change(function(){
|
||||
let t = $('#type').find("option:selected").attr('value');
|
||||
if (s === 'sA')
|
||||
$('tbody > tr').show();
|
||||
else {
|
||||
$('tbody > tr').hide();
|
||||
$('tbody > tr.' + s).show();
|
||||
}
|
||||
if(s !== 'tA') $('tbody > tr:not(.' + t + ')').hide();
|
||||
let s = $('#sex').find("option:selected").attr('value');
|
||||
$('tbody > tr').show();
|
||||
if(t !== 'tA') $('tbody > tr:not(.'+t+')').hide();
|
||||
if(s !== 'sA') $('tbody > tr:not(.'+s+')').hide();
|
||||
});
|
||||
});
|
||||
</script>{% endblock %}
|
Loading…
Reference in New Issue
Block a user