29 lines
808 B
JavaScript
Executable File
29 lines
808 B
JavaScript
Executable File
/*
|
|
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 5
|
|
Version: 5.5.1
|
|
Author: Sean Ngu
|
|
Website: http://www.seantheme.com/color-admin/
|
|
*/
|
|
|
|
var handleFilter = function() {
|
|
"use strict";
|
|
|
|
$(document).on('click', '.pos-menu [data-filter]', function(e) {
|
|
e.preventDefault();
|
|
|
|
var targetType = $(this).attr('data-filter');
|
|
|
|
$(this).addClass('active');
|
|
$('.pos-menu [data-filter]').not(this).removeClass('active');
|
|
if (targetType == 'all') {
|
|
$('.pos-content [data-type]').removeClass('d-none');
|
|
} else {
|
|
$('.pos-content [data-type="'+ targetType +'"]').removeClass('d-none');
|
|
$('.pos-content [data-type]').not('.pos-content [data-type="'+ targetType +'"]').addClass('d-none');
|
|
}
|
|
});
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
handleFilter();
|
|
}); |