mixin breadcrumb(...items)
// BEGIN section.b-breadcrumb
+b('ul').breadcrumb&attributes(attributes)
each item in items
+e('li').item
+e('a')(href="#" title=item).link= item
+e.block
+e('span').dot
// END section.b-breadcrumb
$( document ).ready(function() {
$("input[type='checkbox']").click(function() {
if (!$("input[type='checkbox']").is(":checked")){
$('.time-message__event-info').show();
} else {
$('.time-message__event-info').hide();
$("input[type='checkbox']").each(function() {
if($(this).is(':checked')) {
var filter = $(this).attr('filter');
var data = $(this).attr('data');
$.each($('.time-message__event-info'), function() {
var p = $(this);
var fs = $(this).attr(filter).split(",");
$.each(fs, function(index, value) {
if(data == value) {
p.show();
}
});
});
}
});
}
});
});
var rubric = $('[data-rubric]');
var rubric_items = $('.filter-rubric__item :checkbox');
$('body').on('change', '.filter-rubric__item :checkbox', function() {
var name = this.id;
if($('.filter-rubric__item :checkbox:checked').length == 1){
if($(this).prop('checked')) {
rubric.hide();
$('[data-rubric='+ name +']').show();
} else {
$('[data-rubric='+ name +']').hide();
}
} else if($('.filter-rubric__item :checkbox:checked').length > 1) {
if($(this).prop('checked')) {
$('[data-rubric='+ name +']').show();
} else {
$('[data-rubric='+ name +']').hide();
}
} else {
rubric.show();
}
});
$(document).ready(function() {
// раскрыть панель
$(".b-form-contact").submit(function()
{
if ($(".b-form__feedback").css('display') == 'block') {
$(this).attr('data-validate', true);
} else {
//блок анимации
$(".b-form__feedback").slideDown("slow");
//блок анимации заканчивается
return false;
}
});
});
<div class="b-form">
<form class="b-form-contact" method="post" action="handler.php" data-validate="false">
<div class="b-form__feedback">
<div class="form-group">
<input type="name" class="b-form__input js-validation-change" data-rules="req;min=2" placeholder="Имя"></input>
</div>
<div class="form-group">
<input type="tel" class="b-form__input js-validation-change" data-rules="req;phone" placeholder="Телефон"></input>
</div>
<div class="form-group">
<input type="email" class="b-form__input js-validation-change" data-rules="email;req;" placeholder="Email"></input>
</div>
<div class="form-group">
<textarea type="text" class="b-form__input js-validation-change" rows="3" data-rules="req;min=2" placeholder="Ваш вопрос"></textarea>
</div>
</div>
<input type="submit" class="b-form__submit" value="Задать вопрос"/>
</form>
</div>