Skip to content

A very basic jQuery filter plugin. Show/hide elements based on selected tags.

License

Notifications You must be signed in to change notification settings

tommaitland/filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

filter.js

A very basic jQuery filter plugin. Show/hide elements based on selected tags.

Usage

$(element).filter({
		nav: '[data-filter]' // selector for filter nav (optional)
});

Set the tag to filter with data-filter, eg:

<a data-filter="tag">Tag</a>

Filterable elements should have their tags comma separated in data-filter-tags, eg:

<div data-filter-tags="tag1,tag2,tag3">This is a block</a>

Demo

JSFiddle

Support

I haven't done much testing on this script, and it could probably be more flexible. It requires an element be matched to all selected tags, this could be set to be more loose (etc).

Suggestions/bugs welcome through Issues

About

A very basic jQuery filter plugin. Show/hide elements based on selected tags.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published