Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pFilters = [];
- function togglePotatoes(pType) {
- if (pFilters.indexOf(pType) > -1) {
- pFilters.splice(pFilters.indexOf(pType),1);
- } else {
- pFilters.push(pType);
- }
- console.log(pFilters.join(","));
- $(pFilters.join(",")).hide('fast');
- $("#potatoes li").not($(pFilters.join(","))).show('fast');
- }
Add Comment
Please, Sign In to add comment