  function createNewFilter(name, criteria) {
                var obj = {};
                obj.removed_nodes = false;
                obj.eles = 'none';
                obj.criteria = criteria;
                obj.button = document.getElementById(name);
                obj.button.addEventListener('click', function () {
                    $(this).toggleClass('myClass');
                    if (obj.eles === 'none') {
                        obj.eles = window.cy.$(obj.criteria).remove();
                     