oho/js/oseg-search.js

30 lines
751 B
JavaScript

$(function(){
$('#search-form-input-clear').click(function(){
$(':input','#search-form')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
});
});
$(function(){
$('.filter-selection li').click(function() {
$(this).toggleClass("selected");
});
});
// IE9+
$('.row').on('click', function() {
// Clicking on the parent row will toggle the child check box
$('input[type=checkbox]', this).prop('checked', function(i, checked){
return !checked
})
// Add selected class when box is checked
if($('input[type=checkbox]', this).prop('checked'))
$(this).addClass('selected');
else
$(this).removeClass('selected');
});
// Slide in quick filters for searchform